Jump to content


Photo
- - - - -

How do I have different footers on different pages?

Footer global local page

Best Answer James B , 14 November 2013 - 01:32 AM

Hi Mark

 

The header and footer a global scope unfortunately, so any sections added will take place on all pages etc.

 

You can place into the layout on all pages and use css to hide it on the homepage. Example below, you'll need to replce the page id and the code after the simple nav ID with the relevant details from your site. You can find these using chrome dev tools or firebug to inspect the page.

 

.page-id-26863 #simple_navu2aw09 {display:none;}

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 Mark_Hazeldine

Mark_Hazeldine

    Newbie

  • Members
  • Pip
  • 7 posts
  • LocationLondon, UK
  • Framework Version:DMS (free)
  • Country: Country Flag

Posted 14 November 2013 - 12:07 AM

Hi,

 

I have a pretty basic site where i'm using custom templates. I have one template for my home page, and another one for all other pages (I may add others in future).

 

What I want to do is use the SimpleNav section in the footer of all my pages EXCEPT the home page, where I don't want to have a footer at all. I just can't work out how to do this.

 

Whenever I add SimpleNav to the template I'm using for all my content pages and select Update Template with Current Configuration, it seems to save the changes to all my pages including my home page (which is using a different template).

 

So then, I went to my home page and deleted it, updated that template, and then it was gone from ALL my pages.

 

So I'm assuming that footers are global only??

 

For now, I've managed to make a workaround whereby I've added the SimpleNav section to the bottom of my main content area of the template instead of in the footer, but it's not really a long-term solution. We should be able to have template-by-template control of headers and footers.

 

Thanks, Mark



#2 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 14 November 2013 - 01:32 AM   Best Answer

Hi Mark

 

The header and footer a global scope unfortunately, so any sections added will take place on all pages etc.

 

You can place into the layout on all pages and use css to hide it on the homepage. Example below, you'll need to replce the page id and the code after the simple nav ID with the relevant details from your site. You can find these using chrome dev tools or firebug to inspect the page.

 

.page-id-26863 #simple_navu2aw09 {display:none;}



#3 Mark_Hazeldine

Mark_Hazeldine

    Newbie

  • Members
  • Pip
  • 7 posts
  • LocationLondon, UK
  • Framework Version:DMS (free)
  • Country: Country Flag

Posted 14 November 2013 - 04:44 PM

Thanks James,

 

I just tried it and it seems to work! Just what I needed.

 

Mark



#4 Martin Davies

Martin Davies

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 14 November 2013 - 04:53 PM

Thank you for letting us know this worked for you 







Also tagged with one or more of these keywords: Footer, global, local, page