WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Menu Link in WB27 restricts internal links
  • Print
Pages: [1]   Go Down

Author Topic: Menu Link in WB27 restricts internal links  (Read 7058 times)

Offline olivier

  • Posts: 15
Menu Link in WB27 restricts internal links
« on: March 04, 2008, 03:16:46 PM »
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
Logged

thorn

  • Guest
Re: Menu Link in WB27 restricts internal links
« Reply #1 on: March 04, 2008, 07:21:22 PM »
Hello,

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

thorn.
Logged

Offline mviens

  • Posts: 65
Re: Menu Link in WB27 restricts internal links
« Reply #2 on: May 08, 2008, 11:48:09 PM »
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

Logged

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8544
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Menu Link in WB27 restricts internal links
« Reply #3 on: May 09, 2008, 06:44:38 AM »
Hello,

Quote
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

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
Logged

Offline mviens

  • Posts: 65
Re: Menu Link in WB27 restricts internal links
« Reply #4 on: May 12, 2008, 08:49:28 PM »
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.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Menu Link in WB27 restricts internal links
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2