Page 1 of 1
Different header banner for internal pages
Posted: Tue Oct 16, 2007 12:44 am
by cloudy
Hi,
I am setting up my website using CMSmadesimple. I am able to work with menu and layouts.
In my design, all my internal pages have different internal banners. So Globalcontent block is not working with it? How can I set different banners using one template for all internal pages. I do not want to use different templates for all pages as only banners are different and rest all pages have same design.
Please help.
Thanks in advance
Cloudy
Re: Different header banner for internal pages
Posted: Tue Oct 16, 2007 1:03 am
by calguy1000
1) on the pages that you want a special banner add something like this into the 'metadata' section:
Code: Select all
{assign var='usespecialheader' value='1'}
2) In your page template do something like this:
Code: Select all
{if isset($usespecialheader)}
{global_content name='specialheader'}
{else}
{global_content name='regularheader'}
{/if}
Re: Different header banner for internal pages
Posted: Tue Oct 16, 2007 3:06 am
by cloudy
Hi,
This isn't working the way I want to because in this case I will have to make 7 different global content blocks for different sections plus 7 different if..else statement will have to be added.
I have found another function but don't know how to use it-
http://dev.cmsmadesimple.org/frs/?group ... ase_id=509
Is there a way out. Something more simpler- Like.. Have some tag in template {image }
and upload the image in the image manager so that it picks up according to the section.
Thanks
Re: Different header banner for internal pages
Posted: Tue Oct 16, 2007 3:33 am
by Dr.CSS
Re: Different header banner for internal pages
Posted: Tue Oct 16, 2007 3:38 am
by calguy1000
well, I guess I misunderstood because the description wasn't clear enough.
Why would you need 7 different GCB's, and 7 different {if}...{else}... statements
please provide more information if we can help you further.
If you had a 'splash page' or relatively few 'secondary pages' my logic would be proper. so I guess I don't have enough information.
Re: Different header banner for internal pages
Posted: Tue Oct 16, 2007 6:04 am
by cloudy
Hi,
Thanks calguy and mark for the replies. Both the answers do the work but not very simple.
Apologies for not being clear with my question.
My website sitemap looks something like the following-
Home
1. About us
1.1 Seminars
1.2 Address
2. Customers
2.1 Testimonials
2.2 Case studies
3. Industries
3.1 Ecommerce
3.2 Services
Now I have a different header banner for different section namely- About us, Customers, Industries. Rest of the design for the entire page remains same.
So If there is a banner image named aboutus.jpg then it appears in About us and Seminars and Address pages
Customers banner appear in Customers, Testimonial and case studies pages
Similarly for the rest of the sections.
So I have made one internal Template used for all the pages but do not know how to use one tag to display different banners for different section.
Please help me out. Else I will end up making different templates for different sections.
Thanks in advance
Cloudy
Re: Different header banner for internal pages
Posted: Tue Oct 16, 2007 8:13 am
by lollipop27