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 »
  • Linking to an anchor from the main menu
  • Print
Pages: [1]   Go Down

Author Topic: Linking to an anchor from the main menu  (Read 5350 times)

Offline david doc watson

  • Posts: 88
Linking to an anchor from the main menu
« on: December 03, 2010, 02:08:22 PM »
Using WB v 2.8.1 Rev 1287

I have a series of pages that use a different template and navigation to the rest of the site:

http://www.sweetwoodspark.com/pages/the-course/hole-by-hole-guide.php


Clicking the page links 1, 2, 3 ... etc. reloads the page and takes you to the top of the target page. I would like to be able to add an achonr in index.php and target the menu to go to that anchor on each page when a page is selected in the menu.

Any help in solving this would be appreciated .

Thanks

David "Doc" Watson
Logged

Argos

  • Guest
Re: Linking to an anchor from the main menu
« Reply #1 on: December 06, 2010, 11:26:48 AM »
Very nice site!

Regarding you question, I presume the submenu is done with showmenu2(). Based on the info on http://www.websitebakers.de/sm2/media/README.en.txt, I guess you can just put the anchorname after the link in the $aItemOpen part. If your anchor is #holedescription, use a showmenu like:

Code: [Select]
show_menu2(
        $aMenu          = 0,
        $aStart         = SM2_ROOT,
        $aMaxLevel      = SM2_CURR+1,
        $aOptions       = SM2_TRIM,
        $aItemOpen      = '[li]<a href="[url]#holedescription">[menu_title]</a>',
        $aItemClose     = '</li>',
        $aMenuOpen      = '[ul]',
        $aMenuClose     = '</ul>',
        $aTopItemOpen   = false,
        $aTopMenuOpen   = false
        )

Not tested!
« Last Edit: December 06, 2010, 11:29:42 AM by Argos »
Logged

Offline david doc watson

  • Posts: 88
Re: Linking to an anchor from the main menu
« Reply #2 on: December 08, 2010, 01:51:25 PM »
Hi Argos,

Thanks for your kind comments! Nice CMS by the way!

Yes it is built using showmenu2(). That makes sense, I'll give it a go a report back.
Logged

Offline david doc watson

  • Posts: 88
Re: Linking to an anchor from the main menu
« Reply #3 on: December 08, 2010, 02:48:54 PM »
Thanks - worked a charm.
Logged

Argos

  • Guest
Re: Linking to an anchor from the main menu
« Reply #4 on: December 08, 2010, 03:07:58 PM »
Nice  :-D
Logged

instantflorian

  • Guest
Re: Linking to an anchor from the main menu
« Reply #5 on: December 08, 2010, 05:00:57 PM »
Hi,

for a 1920x1200 screen resolution the background image is too small. Beside this it's a very nice impressive site.

BR
-instantflorian.

[gelöscht durch Administrator]
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Linking to an anchor from the main menu
 

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