Different header banner for internal pages

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
cloudy
Forum Members
Forum Members
Posts: 12
Joined: Tue Sep 18, 2007 10:19 am

Different header banner for internal pages

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Different header banner for internal pages

Post 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}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cloudy
Forum Members
Forum Members
Posts: 12
Joined: Tue Sep 18, 2007 10:19 am

Re: Different header banner for internal pages

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Different header banner for internal pages

Post by Dr.CSS »

calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Different header banner for internal pages

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
cloudy
Forum Members
Forum Members
Posts: 12
Joined: Tue Sep 18, 2007 10:19 am

Re: Different header banner for internal pages

Post 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
User avatar
lollipop27
Forum Members
Forum Members
Posts: 237
Joined: Wed Sep 12, 2007 4:09 pm

Re: Different header banner for internal pages

Post by lollipop27 »

Post Reply

Return to “Layout and Design (CSS & HTML)”