Topic Closed
marcel
26 Posts

Hi,

I'm creating my own theme and have added some pages and subpages. Bij Default themes (like bootswatch) the parent pages are disabled when they contain subpages. I'm trying to do this with my own theme as well, does anyone know how?

Thanks!

5 years ago#7611

juergen
1.4K Posts
53.1K Downloads
16 Plugins
design, web development & visual effects

Basically there are two ways:

1) Without JavaScript: Simply use "External Link" for your parent pages' menu entries and put a hash (#) into the Target URL field.

2) With Javascript:

after the <?php gpOutput::GetHead(); ?> line in your template.php add this script:

<script>
$('document').ready( function() {
 $('ul.menu_top>li>a.haschildren').click( function(event) {
    event.preventDefault();
  });
});
</script>

This is similar to what Bootstrap does. Note: It will prevent you users (with JavaScript on) to access these parent pages by preventing the click event - but search engines will crawl the pages unless you set their robots metatag to "noindex":
Page Manager -> yourParentPage -> Rename/Details -> More Options -> Robots Visibiliy -> [x] noindex

Edited: 5 years ago#7615

marcel
26 Posts

Hi Juergen,

Thanks, it worked! I used the javascript solution and checked the noindex and no follow boxes for the parent pages.

5 years ago#7627

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register