Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 01:31:43 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155538 Posts in 21712 Topics by 7737 Members
Latest Member: deanmacullam
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Linking to an anchor from the main menu  (Read 615 times)
david doc watson

Offline Offline

Posts: 49



« 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
Moderator
**
Offline Offline

Posts: 2161


WWW
« 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:
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

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
david doc watson

Offline Offline

Posts: 49



« 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
david doc watson

Offline Offline

Posts: 49



« Reply #3 on: December 08, 2010, 02:48:54 PM »

Thanks - worked a charm.
Logged
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #4 on: December 08, 2010, 03:07:58 PM »

Nice  grin
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
instantflorian
Betatester
*
Offline Offline

Posts: 804



WWW
« 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.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!