HighDots Forums  

Stylesheet attached to template does not transfer totemplate-based files

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Stylesheet attached to template does not transfer totemplate-based files in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
adrian.stock22
 
Posts: n/a

Default Stylesheet attached to template does not transfer totemplate-based files - 11-26-2004 , 02:42 AM






Stylesheet attached to template does not transfer to template-based files Hi
All, 1 I would like thank a forum member who helped me with a query (on
creating a rotating display by means of the refresh meta-tag) about a week ago
but cannot do so because, in the flood of new daily messages, I am unable to
find my own last contribution. Is there a way of searching the forum for a
contributor's/originator's name? 2 I use DW MX. I have a template with a
stylesheet attached to it. In the past, whenever I created a file based on a
template (file | new | create template based file) the new file would
automatically have that style sheet. However, all of a sudden, the
template-derived file no longer has a stylesheet. I cannot see what I am doing
wrong. Could something in the Preferences settings be amiss? It is remotely
possible that Dreamweaver was reinstalled since I last need to create a
template-derived file. Please help. Thanks. Adrian


Reply With Quote
  #2  
Old   
Tron
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer to template-basedfiles - 11-26-2004 , 03:28 AM






adrian.stock22 wrote:
Quote:
Stylesheet attached to template does not transfer to template-based files Hi
All, 1 I would like thank a forum member who helped me with a query (on
creating a rotating display by means of the refresh meta-tag) about a week ago
but cannot do so because, in the flood of new daily messages, I am unable to
find my own last contribution. Is there a way of searching the forum for a
contributor's/originator's name?
Using a newsgroup reader instead of the web interface (which can be
troublesome sometime) you can just sort by poster. That's simple enough.
There is a search function on the forum, but I have found it hit and
miss, when I've used it.


2 I use DW MX. I have a template with a
Quote:
stylesheet attached to it. In the past, whenever I created a file based on a
template (file | new | create template based file) the new file would
automatically have that style sheet. However, all of a sudden, the
template-derived file no longer has a stylesheet. I cannot see what I am doing
wrong. Could something in the Preferences settings be amiss? It is remotely
possible that Dreamweaver was reinstalled since I last need to create a
template-derived file. Please help. Thanks. Adrian
Here's the explaination from Dreamweaver Help

To create a link in a template file, use the folder icon or the
Point-to-File icon in the Property inspector; don't type in the name of
the file to link to. If you type the name, the link might not work. This
section explains how Dreamweaver handles links in templates.

When you create a template file from an existing page, then save that
page as a template, Dreamweaver updates the links so they point to the
same files as before. Because templates are saved in the Templates
folder, the path for a document-relative link changes when you save the
page as a template. In Dreamweaver, when you create a new document based
on that template and save the new document, all the document-relative
links are updated to continue to point to the correct files.

When you add a new document-relative link to a template file, however,
if you type the path into the link text box in the Property inspector,
it's easy to enter the wrong path name. The correct path is the path
from the Templates folder to the linked document, not the path from the
template-based document's folder to the linked document.

The simple way to check is to see if your link to says
/styles/stylesheet.css or ../styles/stylesheet.css? The latter is correct.

If you've done what I've said (or rather, dreamweaver help says) and it
still doesn't work, post a link.


Reply With Quote
  #3  
Old   
adrian.stock22
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer totemplate-based files - 11-26-2004 , 04:32 AM



Hi, Newsgroup User, thanks for trying, but the text you have posted does not
address my problem at all: You say: 'To create a link in a template file,
use the folder icon or the Point-to-File icon in the Property inspector; don't
type in the name of the file to link to. If you type the name, the link might
not work. This section explains how Dreamweaver handles links in templates.'
My comment: I do not wish to create a link in a template file You say: 'When
you create a template file from an existing page, then save that page as a
template, Dreamweaver updates the links so they point to the etc etc etc' My
comment: I do not wish to create a template file from an existing page. I have
already successfully created my template. It sits in the template directory and
has the correct extension. It has a style sheet attached to it (as I said in my
question) and has all the features I want the template to have. You say:
'When you add a new document-relative link to a template file, however, etc etc
etc' My comment: This is not something I wish to do. You say: 'The simple
way to check is to see if your link to says /styles/stylesheet.css or
.../styles/stylesheet.css? The latter is correct.' My comment: I have known
this for years, and the link to the style sheet ain't there. I do have the DW
Helpfile and a couple of hefty manuals. They do not pinpoint my problem. To
restate my problem: ----------------------- I have a template with an attached
style sheet. When I create a file based on that template, the style sheet is
not attached to the new file. By contrast: The background colours and
editable areas transfer correctly to the template-derived file. I.e. some
properties of the template (e.g. the style sheet) do not transfer to the
derived files. I wonder whether there is something in the preferences which
prevents the proper transfer taking place. Anyone out there who can help?
Thanks. Adrian


Reply With Quote
  #4  
Old   
.: Nadia :. *TMM*
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer to template-based files - 11-26-2004 , 04:39 AM



"adrian.stock22" <webforumsuser (AT) macromedia (DOT) com> wrote

I have a template with an attached
Quote:
style sheet. When I create a file based on that template, the style sheet
is
not attached to the new file. By contrast: The background colours and
editable areas transfer correctly to the template-derived file. I.e. some
properties of the template (e.g. the style sheet) do not transfer to the
derived files. I wonder whether there is something in the preferences
which
prevents the proper transfer taking place. Anyone out there who can help?
Thanks. Adrian
If you have linked the stylesheet correctly, you shouldn't have any problems
with the child pages reading the stylesheet. There has to be something
wrong somewhere. You don't have any editable tags around the link or
anything do you? (searching in the dark here - and probably a silly thing
to ask you - but you never know :-)

Can you upload a child page, or post the code from your template? someone
maybe able to spot the problem....

--
Nadia

Team Macromedia Volunteer for Dreamweaver
--------------------------------------------
Free Templates | Free Nav Bar Sets
http://www.DreamweaverResources.com
Dropdown/Flyout Menu Designs | CSS Layouts
Ecommerce - YVStore | SEO Articles |Tutorials
---------------------------------------------
MM Dreamweaver Tutorials
http://macromedia.com/devnet/mx/dreamweaver/
---------------------------------------------
Email: nperre at gmail dot com
---------------------------------------------








Reply With Quote
  #5  
Old   
adrian.stock22
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer totemplate-based files - 11-26-2004 , 05:13 AM



Hi, Nadia, Thanks. The problem occurs in a large site which I am revamping.
I will now create a little testsite, from scratch. Will see if the problem
recurs in the testsite, which I will then post. I will post the link to the
testsite within the hour. Thanks. Adrian


Reply With Quote
  #6  
Old   
adrian.stock22
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer totemplate-based files - 11-26-2004 , 11:36 AM



Hi, Nadia (and all), Please see the template and the index file derived from
it at the following address: http://www.tudo.co.uk/testsite_01/ I notice that
the html reference for the css file is contained in the derived index file:
<link href='rochdale.css' rel='stylesheet' type='text/css'> But the style
sheet does not show up in the style sheet panel of the index page. I have the
impression that the path for the css file is not correctly specified. But this
should have been done by DW automatically and correctly, since the index file
is derived from the template, by the following method: file > new > new from
template > template > clicked on rochdale_index_template.dwt > create So if
the link is incorrect, why did DW not create it correctly? Over to you, and
all. Thanks.


Reply With Quote
  #7  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer to template-basedfiles - 11-26-2004 , 11:53 AM



adrian.stock22 wrote:

Quote:
Hi, Nadia (and all), Please see the template and the index file derived from
it at the following address: http://www.tudo.co.uk/testsite_01/ I notice that
the html reference for the css file is contained in the derived index file:
link href='rochdale.css' rel='stylesheet' type='text/css'> But the style
sheet does not show up in the style sheet panel of the index page. I have the
impression that the path for the css file is not correctly specified. But this
should have been done by DW automatically and correctly, since the index file
is derived from the template, by the following method: file > new > new from
template > template > clicked on rochdale_index_template.dwt > create So if
the link is incorrect, why did DW not create it correctly? Over to you, and
all. Thanks.

Check that the site is correctly defined. You have several links
pointing to your own drive (e.g.
file:///G|/websites/shell/0_images_and_utilities/Background%20color/049_honeycomb_449.gif)
so I'm suspecting that you have screwed up in that respect in more
places, too.

--
Dan Vendel - *GOF*
"Eagles may soar, free and proud, but weasels never get sucked into jet
engines."
Contact: http://www.proformica.com/contact.shtml
Call or chat me via Skype ID: danvendel, but DON'T ask questions that
you can ask here! (get Skype at http://skype.com)


Reply With Quote
  #8  
Old   
adrian.stock22
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer totemplate-based files - 11-26-2004 , 03:08 PM



Hi Dan, and All, Please look at the testsite again:
http://www.tudo.co.uk/testsite_01/ I have removed that reference to my own
hard drive
background='file:///G|/websites/testsite_template_stylesheet/images/049_honeycom
b_449.gif' DW puts this automatically into the child file. The template file
has the following in the corresponding position:
background='../images/049_honeycomb_449.gif' So this is yet another part of
DW's screwing things up. The site was always correctly defined by standard
Dreamweaver methods. I have a feeling that some of the preferences are wrongly
set and that's why DW does not produce the correct links and paths. Please
have a look again. Why does DW not produce the correct path for the style
sheet reference in the index page (child page), which was based on the
template. ----------------------------- After experimenting with the site for
a while, all of a sudden DW produced the css file in the child page, but only
after having changed the link reference to: <link
href='file:///G|/websites/testsite_template_stylesheet/utilities/rochdale.css'
rel='stylesheet' type='text/css'> Sometimes, behind my back so to speak (or
after having uploaded a page), I find that DW has changed this reference to:
<link href='utilities/rochdale.css' rel='stylesheet' type='text/css'> Hope to
hear from someone soon. Adrian


Reply With Quote
  #9  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer to template-basedfiles - 11-26-2004 , 03:25 PM



adrian.stock22 wrote:

Quote:
Hi Dan, and All, Please look at the testsite again:
http://www.tudo.co.uk/testsite_01/ I have removed that reference to my own
hard drive
background='file:///G|/websites/testsite_template_stylesheet/images/049_honeycom
b_449.gif' DW puts this automatically into the child file. The template file
has the following in the corresponding position:
background='../images/049_honeycomb_449.gif' So this is yet another part of
DW's screwing things up. The site was always correctly defined by standard
Dreamweaver methods. I have a feeling that some of the preferences are wrongly
set and that's why DW does not produce the correct links and paths. Please
have a look again. Why does DW not produce the correct path for the style
sheet reference in the index page (child page), which was based on the
template. ----------------------------- After experimenting with the site for
a while, all of a sudden DW produced the css file in the child page, but only
after having changed the link reference to: <link
href='file:///G|/websites/testsite_template_stylesheet/utilities/rochdale.css'
rel='stylesheet' type='text/css'> Sometimes, behind my back so to speak (or
after having uploaded a page), I find that DW has changed this reference to:
link href='utilities/rochdale.css' rel='stylesheet' type='text/css'> Hope to
hear from someone soon. Adrian

Everything seems to be OK in that file as far as I can see (except that
you don't have a complete DTD, but that's another story). Is that
spawned from the template?

Anyway: I would start out fresh if I were you. Create a spawned page,
then detach it from the template. Create a new site (with new, carefully
entered site definitions, etc) and get the page you just created and
detached into the new site, save as a template, etc. Of course, make
sure that all preferences are OK.

Then when adding images, css, etc, make sure that you have "document
relative" paths selected in the dialog window when navigating for the
files to insert.

I'm sorry, but it's virtually impossible for me to guess what might be
wrong since it might be a practical thing you do somewhere, and one
would need to see how you work to be able to pinpoint the mistake - if
that's what it is.

--
Dan Vendel - *GOF*
"Eagles may soar, free and proud, but weasels never get sucked into jet
engines."
Contact: http://www.proformica.com/contact.shtml
Call or chat me via Skype ID: danvendel, but DON'T ask questions that
you can ask here! (get Skype at http://skype.com)


Reply With Quote
  #10  
Old   
.: Nadia :. *TMM*
 
Posts: n/a

Default Re: Stylesheet attached to template does not transfer to template-based files - 11-26-2004 , 06:08 PM



"adrian.stock22" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi Dan, and All, Please look at the testsite again:
http://www.tudo.co.uk/testsite_01/
Really weird Adrian,

I've had a very quick look at the code for the template and the child
page... all links seem to be assigned correctly.

Quote:
have removed that reference to my own
hard drive
background='file:///G|/websites/testsite_template_stylesheet/images/049_honeycom
b_449.gif' DW puts this automatically into the child file.
That is definitely wrong. Usually a link like that happens when a site
isn't defined and you place an image on the page - it will reference your
local drive whereever the image is located. From the above, it appears that
the image isn't in a folder in your definied site.

Quote:
The template file
has the following in the corresponding position:
background='../images/049_honeycomb_449.gif' So this is yet another part
of
DW's screwing things up.
Actually that is correct, it is looking at the root of the folder structure
.../images/whatever.gif
but then on the child page it should be (as is according to your child page
html), images/whatever.gif

The site was always correctly defined by standard
Quote:
Dreamweaver methods. I have a feeling that some of the preferences are
wrongly
set and that's why DW does not produce the correct links and paths.
The only preference that would make a difference would be doc or root
relative linking. Make sure you always use doc relative, for all your
files, images css etc., especially when working on the template page.

If you are sure that you are working in a defined site and that your images
and css are within folders within the defined site, what about recreating
the site cache... that's the only thing I can think of. We may need to
wait until the template guru returns from his holiday to sort this out :-)

--
Nadia

Team Macromedia Volunteer for Dreamweaver
--------------------------------------------
Free Templates | Free Nav Bar Sets
http://www.DreamweaverResources.com
Dropdown/Flyout Menu Designs | CSS Layouts
Ecommerce - YVStore | SEO Articles |Tutorials
---------------------------------------------
MM Dreamweaver Tutorials
http://macromedia.com/devnet/mx/dreamweaver/
---------------------------------------------
Email: nperre at gmail dot com
---------------------------------------------






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.