Re: variables in included templates
Brandon Long <[email protected]> Sun, 17 Feb 2008 23:32:57 -0800
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Organization | Fiction L Networks |
| Message-ID | <20080218073257.GB21050@bl1> |
On 02/17/08 Bjorn uttered the following other thing:
> Hi,
>
> I'm using the include function in the template syntax to include a
> common header for all of my pages. I would like the title to be
> dynamic, but I can't seem to set the title. My main template file
> looks like this:
>
> <?cs include:"templates/header.cs" ?>
> <p>Hello World</p>
> <p>Testing <?cs var:Title ?>
> <?cs include:"templates/footer.cs" ?>
>
> in header.cs I have:
>
> <html>
> <head><title><?cs var:Title ?></title>
> </head>
> <body>
>
> In my C program I'm setting "Title" to "Welcome" and the var:Title in
> the main template shows 'Welcome', but the included file, the header,
> does not. Is there a way to do what I want?
Yes, that should work. Are you sure you don't have some typo or
something?
Brandon
--
"pretty code isn't always the right thing to do. people spend much
more time reading mail than looking at the source code."
-- Michael Elkins, mutt author
http://www.fiction.net/blong/