WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 06.08.2023 09:06:24

foxlake
Member

Top menu button with dropdown whitout link

In Templates like Fragstan for example (and many others) with a dropdown you sometimes want that the top button has no link in it.
The name for that page is a 'collection name' for the page under it.

What we do now is the following: We make a menu link and lead it to the first page right under the top button.   That went good for a long time.

But now Google comes with 'You have double pages' and that will make you dropdown on the ranking page of google'.

So what I want to make is that the top button has no function, no link in it.  Just like you do on the WBCE home page. In the template section you see that Fragstan works different.  Is there a 'addon' to make something disable the top menu button ? Just showing the links under this ?

For example, that the NEW PAGE, menu link has Internal, External and NO LINK ?

Thank you in advance.  (I good not find it in the forum / or on google regarding WBCE)



Foxlake

Last edited by foxlake (06.08.2023 09:17:54)

Offline

#2 07.08.2023 06:21:01

florian
Administrator

Re: Top menu button with dropdown whitout link

You need to customize the show_menu2-call in the template.
In the call, replace the part

<a href="[url]"

with

<a [if (class!=menu-expand) {href="[url]"}]

then parent items will have no href.

Another way: add

define('SM2_CORRECT_MENU_LINKS',true);

to your config.php.
Select "external link" for "collection menu links" and  let them point to "#".

The config.php addition ensures that the menu items link to the real target, not to the access files of the menu link pages. That means, if you have a menu item "products" linking to the page products/bananas.php, without the addition the products entry links to "products.php" and the forwarding is done by the menu link, what indeed Google might not like. With the addition, "products" links to "products/bananas.php" as href too. So then a page with the same URL is arrivable under different titles. I don't think this is an issue for Google.

I will check if it is possible to add a "target: none" option to  the module.
Edit: not possible due to the way a menu item page usually works (redirect)

Last edited by florian (08.08.2023 05:52:33)


Code allein macht nicht glücklich. Jetzt spenden!

Offline

Liked by:

stefanek

#3 08.08.2023 18:23:04

foxlake
Member

Re: Top menu button with dropdown whitout link

Thank you, I will try that.

Offline

#4 03.09.2023 10:28:11

foxlake
Member

Re: Top menu button with dropdown whitout link

Hello Florian

add to your config.php.
Select "external link" for "collection menu links" and  let them point to "#".

Worked out fine ! Thank you verry much.

Offline

Liked by:

stefanek

Board footer

up