template variable

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
carterbeech
Forum Members
Forum Members
Posts: 48
Joined: Tue Nov 14, 2006 9:06 pm

template variable

Post by carterbeech »

Is there a way to add a variable to a page template so that I could have it read the parent section name and provide a different header or image without having to generate new template?

something like

img src="images/{parent}-header.jpg"

thanks.
Shanma
New Member
New Member
Posts: 5
Joined: Thu Jan 31, 2008 1:58 am

Re: template variable

Post by Shanma »

I haven't tried it yet, but this plugin sounds like it does what you want:

http://dev.cmsmadesimple.org/projects/sectionimage
"This plugin allows you to add an image to your site that displays according to the site section."

Hope this helps.
chimmyc
New Member
New Member
Posts: 7
Joined: Wed May 02, 2007 8:46 pm

Re: template variable

Post by chimmyc »

Sectionimage is probably what you're looking for, yeah.

A quick and dirty way I've used in the past is to use something like img src="{Title}.jpg" in the template. This is less flexible, and less elegant, but works for most applications.
Post Reply

Return to “CMSMS Core”