How to make a no-clickable page in a drop-down menu?

Permalink 1 user found helpful
Hello.
I am using the boldy theme, with his own drop-down menu.
I would like that some of the main options of the menu were just to go to other pages, not a page itself.
Does anyone know how to do?
Thanks..

frankysev
View Replies:
Steevb replied on at Permalink Reply
Steevb
Not sure I understand?

If you want to link to other pages, create the pages and link to them?

If you want pages within the drop down, go to dashboard, click on a add page (page you want to add a page to) then add page.

Return home page and new pages should be there either in main menu or drop down.

Does that help?
frankysev replied on at Permalink Reply
frankysev
Thank you for your answer.

I'll try to explain. The idea is one of the options in the main menu it is not a page itself, just a name to refer the real pages in the dropdown menu.

For example, in the main menu, "CARS", and inside it, the dropdown menu "Volkswagen", "Renault", "Citroen". I would like to be able to click on the three, but not on "Cars".

Sorry for my English.
Steevb replied on at Permalink Reply
Steevb
Make 'Cars' a rollover dead link or hash sign '#' and it will not go anywhere.

Or give 'Cars' its own page with links to all others.

More links help with SEO.

Does that help?
jordanlev replied on at Permalink Reply
jordanlev
The easiest way to do this is to use the "Replace Link With First In Nav" attribute. This will make it so clicking on "CARS" goes to the first page under it (Volkswagon in your example). This isn't exactly what you want but it's the easiest to do:
http://www.concrete5.org/index.php?cID=125451#127655...

If you need to make it work exactly as you describe, it's more complicated. You can either create a custom template for the autonav block that checks for that specific page and doesn't output a link for it, or you can put in some javascript that changes that link's href to just "#".
leinteractive replied on at Permalink Reply
leinteractive
Or, in the Dashboard of your site, go to Sitemap.

Click on Home and instead of Add Page, choose Add External Link and make the URL of that link be a Hash Sign #

You can't add a page underneath an External Link directly. So what you have to do is add all of your subpages underneath your Home Page and then Drag & Drop them onto the # links that you want them to appear under.

Make sense?
frankysev replied on at Permalink Reply
frankysev
Thank you very much to 55webdesign, jordanlev and leinteractive.
I am trying to follow your recomendations and I think I will be able to success.
Thanks again.
Dinamicore replied on at Permalink Reply
Dinamicore
The external link with hash is the best solution. Just one thing; the hand is still present on mouseover; any css or javascript to replace the hand with a separator (like Joomla does)?. Thanks
Steevb replied on at Permalink Reply
Steevb
Use CSS, try: cursor:text;
Dinamicore replied on at Permalink Reply
Dinamicore
Autonav writes this: <a href="#" >Drinks</a>; I am testing link {cursor:text} but the hand still there; also I believe I need a specific instruction so only the a href="#" will have hand replaced, not the full links. Thanks.
weyboat replied on at Permalink Reply
weyboat
jordanlev has given you the best solution, just follow his link to a page with full instructions,
I wasted time trying the http://# trick without success, the replace_link_with_first_in_nav attribute worked for me like a charm..
Thanks jordanlev, your a star..
Dinamicore replied on at Permalink Reply
Dinamicore
Thanks weyboat and jordanlevy; yes, agree;it is the best solution.
jacknjean replied on at Permalink Reply
jacknjean
Hey guys, I kind of did a bit of a hack that seems to have worked:

I created an autonav template by making the directory blocks/autonav/templates
and then copying the file concrete/blocks/autonav/view.php but naming view.php something else (dropdown.php in my case).

Now: lines 67-73 of the real autonav block read:
if ($c->getCollectionID() == $_c->getCollectionID()) { 
            echo('<li class="nav-selected nav-path-selected"><a class="nav-selected nav-path-selected" ' . $target . ' href="' . $pageLink . '">' . $ni->getName() . '</a>');
         } elseif ( in_array($_c->getCollectionID(),$selectedPathCIDs) && ($_c->getCollectionID() != HOME_CID) ) {
            echo('<li class="nav-path-selected"><a class="nav-path-selected" href="' . $pageLink . '" ' . $target . '>' . $ni->getName() . '</a>');
         } else {
            echo('<li><a href="' . $pageLink . '" ' . $target . ' >' . $ni->getName() . '</a>');
         }


I changed them to read:

if ($c->getCollectionID() == $_c->getCollectionID()) { 
            echo('<li class="nav-selected nav-path-selected"><a class="nav-selected nav-path-selected" ' . $target . ' href="' . $pageLink . '">' . $ni->getName() . '</a>');
         } elseif ( in_array($_c->getCollectionID(),$selectedPathCIDs) && ($_c->getCollectionID() != HOME_CID) ) {
            echo('<li class="nav-path-selected"><a class="nav-path-selected" href="' . $pageLink . '" ' . $target . '>' . $ni->getName() . '</a>');
         } elseif ($_c->getCollectionAttributeValue('replace_link_with_first_in_nav')) {
            echo('<li class="arrow"><a href="#" ' . $target . ' >' . $ni->getName() . '</a>');
         } else {
            echo('<li><a href="' . $pageLink . '" ' . $target . ' >' . $ni->getName() . '</a>');
         }




The catch here is that I had to create the attribute replace_link_with_first_in_nav and add that to those pages in my dropdown, but that's simple enough and I actually created a page type for going forward that automatically has that attribute selected so that when I am adding a parent page. I just make it that page type and I'm golden.
nerdess replied on at Permalink Reply
nerdess
here is also a solution: i used the plugin "Page Auto Redirect" (http://www.concrete5.org/marketplace/addons/page-auto-redirect/) in conjunction with @jacknjean's idea and just changed the elseif to

} elseif ($_c->getCollectionAttributeValue('page_redirect_selector')) {