Thanks for your response.
Greg A. - 10 May 2008 12:55 AM
If you are looking to link to a css file in a template group called “foo” and you have named your css template ‘bar’, you would call it in the head of an html template as follows:
{stylesheet=foo/bar}
I think I have the conventional method of linking to a css file working correctly. What I’m trying to do is to understand how you would define this link as a global variable and then how you would replace the conventional link in the html header with the global variable.
So if my existing link is
<link rel="stylesheet" type="text/css" media="all" href="{stylesheet=bn_trial/article_page_header}" />
I’m assuming that you can create a global variable that represents this link and use it in different templates.
My question is does the global variable represent just the information within {} or is it the whole link <....> or should it be something else?
Then my other question is how is this created?
There are two fields in the setup menu, a name variable and the variable content. Do you just pick a name for the variable, that meets the rules of course, and then paste the link or file reference into the field? For instance:
Variable name=foo
Variable content= <link rel=“stylesheet” type=“text/css” media=“all” href=”{stylesheet=bn_trial/article_page_header}” />
Or
Variable name=foo
Variable content= stylesheet=bn_trial/article_page_header
And my third related question was, how do you then call up the global variable in the header so that the CSS file is read?
Do you in some way just use “foo”
Or is it something like
<link rel=“stylesheet” type=“text/css” media=“all” href=”{foo}” />
Per Ingmar’s contribution at the bottom of the docs, “{site_url}” is the only variable that is parsed regardless.
.......
Does this make sense?
-greg
Thanks