Menu Link in WB27 restricts internal links

mviens

Hi Matthias,

Thanks for the info - that clears it up for me.

I originally looked in to this because I didn't have actual pages for the 1st level menus, I simply wanted the dropdown menus to appear on the rollover. The browser would have to select a 2nd level menu item to get a page.  I had found earlier discussions about making the 1st level a "menu_link" and had followed that for other sites in WB2.6.

I then realized that I could modify the show_menu2 code that I had come up with as follows to remove the url link all together for the 1st level menus and it works exactly as I want:
changed
href="[url]"
to
href="#"

show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_NUMCLASS|SM2_PRETTY, '[if(level==0){<li class="[class]"><a class="link[page_id]" href="#">[/a]}else{
  • [a][menu_title]</a>}]');

    Wonderful stuff this Baking.

ruebenwurzel

Hello,

QuoteI want the 1st level menus link to their first submenu respectively:

Menu A (I want to link directly to menu A1)
- menu A1
- menu A2
- menu A3

Menu B (I want to link directly to menu B1)
- menu B1
- menu B2
- menu B3

This works with WB 2.7 with menu_link like a charm but to get it working is a little bit tricky. Basically the issus is that you cannot change the page typ from f.e. WYSIWYG to menu_link after a page is created. So i resolved it this way:

1.) Create the page "menu A1" as WYSIWYG
2.) Create now the Page "menu A" in the same level as "menu A1" as typ menu_link and link to "menu A1".
3.) Make now the "menu A1" as subpage from "menu A".

That's all. And it is independend from the menu_call. It work's for all levels with standard show_menu2(). Also this trick can easiliy be used for multilingual pages. (Example here: http://www.aupair-agentur-stern.de) If you typ in the blank URL you got directly routed to the first subpage of the root page.

Hope this helps

Matthias

mviens

I also have used Menu Link in WB2.6 to create internal links and am trying to do the same in WB2.7. I tried using the "external link" as directed to create an internal link but it's not working.

I have setup (after a lot of testing) a main menu that uses images in the 1st level (level = 0) and have modified the show_menu2 call like this:

show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL|SM2_NUMCLASS|SM2_PRETTY, '[if(level==0){<li class="[class]"><a class="link[page_id]" href="[url]" target="[target]" alt="[menu_title]">[/a]}else{
  • [a][menu_title]</a>}]');

    I want the 1st level menus link to their first submenu respectively:

    Menu A (I want to link directly to menu A1)
    - menu A1
    - menu A2
    - menu A3

    Menu B (I want to link directly to menu B1)
    - menu B1
    - menu B2
    - menu B3

    If I use ' href="[url]" ' in show_menu2, my url still shows as /pages/Menu-A.php and if I click the menu link, I get the page with "Click HERE to go to the main page"

    If I use ' href="[menu_title]" ' in show_menu2, I just get /pages/Menu A and if I click the menu link, I get a 404 error - page doesn't exist.

    Suggestions?

    Thank you,
    Michael


thorn

Hello,

you can choose "External Link" and enter the absolute URL into the second field.

thorn.
[url=http://nettest.thekk.de/doku.php]Projekte[/url]

olivier

Hi there,
WB27 looks like a great improvement, thanks for that.
In particular I was interested in the new Menu Link module, in combination with the Image Gallery.
That Image Gallery makes its own pages, not only in the subdirectory of Pages, but also in a subsubdirectory pages/gallery.
The new Menu Link works great, but can not reach that subsubdirectory of ´Pages´ - and I can not type myself another kind of internal link (as in the old menulink-module). So, to point to the internal pages in the Gallery-subsubdirectory (where I can have a big image and thumbnails surrounding), I have to use the external link to http://www.mijndomein.nl/pages/gallery/namexx.php
I feel sorry that I am not a programmer and cannot contribute in solving this ..
Regards,
Olivier