Jump to content


Photo
- - - - -

Hide sections on individual pages

hide sections

  • Please log in to reply
6 replies to this topic

#1 BentleyD

BentleyD

    Super Member

  • Members

  • 155 posts
  • Framework Version:dms
  • Country: Country Flag

Posted 20 October 2013 - 08:45 PM

I'm having trouble hiding sections on individual pages like you could in the previous version of pagelines. When im in the DMS editor I set local setting and remove the section on the pages i don't want it on and it removes the section from all locations on the website. How can i hide a section just on one page and still have the section present on the home page?



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17580 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 21 October 2013 - 07:50 AM

Hi,

 

The ability to hide sections in a similar fashion to PageLines Framework isn't possible at the moment (it has been reported). However, what you should do is create a template that is used on your homepage only.

 

Also please be aware that any sections added to the Header or Footer will be appear throughout your site, as these areas are global templates.



#3 globalnative

globalnative

    Advanced Member

  • Members

  • 93 posts
  • Country: Country Flag

Posted 19 January 2014 - 04:55 PM

Is there an update on this or a time-frame for adding section visibility based on which page it's on?

 

Thanks

Nate



#4 grahamd79

grahamd79

    Advanced Member

  • Members

  • 56 posts
  • Country: Country Flag

Posted 19 January 2014 - 08:26 PM

Hi you could just add a class to the section you do not want to show on a page and use some inline css on the page itself (even in the post or page content rather than in any other section) to have that section class attributed as display: none.

For example, say you gave a section the class "nohome" via the DMS front end options and on your homepage content you added style tags on the page content:

<style type="text/css">.nohome {display: none;} </style>

This would give you the effect you are looking for.



#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 17580 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 20 January 2014 - 12:32 PM

The simplest way to do this at this moment in time is to do the following:

 

Give your section a class name for this example, lets say we have a MediaBox with an image that you do not want displayed on a specific page that has an id of 100.

 

1. Go to the MediaBox in question and in the styling classes field, add the following (this could be anything):

 

hide-me
 
2. Now save your changes and then go to DMS Toolbar > Custom Code > Custom CSS/LESS
3. In the Editor, add the following code:
 
.page-id-100 {
  .hide-me {
    display: none;
  }
}
 
4. Click save/Publish and when you visit that page, the MediaBox with that class will no longer be visible on that page (which has an ID of 100). You can change the ID for other pages.
 
You can also include this class on other sections too, as long as they're on that page it will work.


#6 jmad

jmad

    Advocate

  • Members

  • 963 posts
  • LocationCentral Florida
  • Framework Version:DMS
  • Country: Country Flag

Posted 13 February 2014 - 04:01 PM

I would like to hide the fixed nav on just the home page.  I've tried a couple things that didn't work.  How would I accomplish this?



#7 James B

James B

    Advocate

  • Members

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

Posted 14 February 2014 - 06:17 AM

Hi there, the home page has it's own class, so you can use .home as a prefix to your css for hiding the navbar so it only applies it to the homepage and not sitewide.

 

.home .section-navbar {

                      display:none;

}