Page 1 of 1

(SOLVED) Limitation of templates - illustrations (images) outside of text area?

Posted: Mon May 26, 2008 9:09 pm
by ferrer
Hello there,

Well, compared to the months I have spent fiddling with Joomla, I am very impressed with CMCMS. One problem though...

I have my templates done, and I want to add illustrations or "banner images" if you like, to each section of my site.

So the about section has an "about" image banner, the products page has a "product" image banner, etc...

Different ones for each section, some may use flash so I can't just position the images with CSS and insert them using the editor. These banner images / flash embed code should reside outside of the main content area by my header. I want to be able to set them fairly easily within the CMS.

I have no idea how to do this, do I need to make a different template for each page section? Seems a bit excessive, and I am sure there is a better way,I just can't work out how to do it.
In Joomla I would create a empty "module" containing the image embed code, and assign it to sections in the CMS, but I am not sure how to the do the same.  Can anyone offer any insight?  ???

Thank you, and thank you for all your hard work with this great CMS.

Tristan

Re: Limitation of templates - illustrations (images) outside of text area?

Posted: Tue May 27, 2008 6:24 pm
by calguy1000
No, you don't need to create a different template for each page section.

You need to do some reading on smarty,

and then check out the CGSimpleSmarty module.  It has methods for getting the 'root page alias' of the current page, so you could detect what the section is, and display an appropriate image/flash/whatever content.

SOLVED: Limitation of templates - illustrations (images) outside of text area?

Posted: Wed May 28, 2008 12:43 am
by ferrer
Thanks for the pointers, I think I found an easier way...

I created an empty div in my template, and then create a custom stylesheet setting the image I want in that div. I then attatch it to the pages I want using:

{stylesheet name="mystylesheetname"}

This way i get per page control of the image...

However reading more I found out about content blocks, which I hadn't seen before. I haven't read more but if I understand I could simply put
{content block='headerimage'}

in my template, and it would give me another editor in which to put the illustration?

Seems the easiest way.

Re: Limitation of templates - illustrations (images) outside of text area?

Posted: Wed May 28, 2008 1:54 pm
by calguy1000
Yeah, that'll provide you with another content block 'per page'.

but your original post said you wanted to have a banner for each 'section'.  Implying that there could be multiple different pages under each 'section', but they'd have the same banner image.

My solution would address that