• 0
Sign in to follow this  
Followers 0

Hide sections on individual pages


Question

Posted · Report post

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?

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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

 

Thanks

Nate

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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;

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0