WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Adding title="LINKNAME" to generated menu links.
(1/1)
myownalias:
Hello fellow WB'ers,
I found this wonderfully simple CMS a few weeks back and now I am implementing WB into a friends websiite. I want to be able to add title="LINKNAME" to links generated by WB. I assume that it's in one of the modules somewhere but can't find it by searching the content of the files. Any help on how to implement this would be greatly appreciated.
Jason.
Stefek:
Do you want to have the title attribute in the menu or in general links (in the content)?
For the content it's pretty simple. Just use the link button in the FCK Editor and go to the "advanced tab".
Regards,
Stefek
myownalias:
Thanks for the reply Stefek,
I want to be able to add the title directly to the menu links generated by WB.
Jason.
mviens:
Hi Jason,
If you are using showmenu_2 to generate your menus (default in Baker), and haven't already done so, you will want to check out the JellyCan documentation:
http://code.jellycan.com/files/show_menu2-README.txt
http://code.jellycan.com/sm2test/
It's fairly indepth and takes a bit to get the hang of but its very useful in customizing menus.
Good luck!
Michael
Stefek:
Hello.
Yee, this is an example from this site:
--- Code: ---<?php
show_menu2(
$aMenu = 0,
$aStart = SM2_ROOT,
$aMaxLevel = SM2_CURR+1,
$aOptions = SM2_TRIM,
$aItemOpen = '[li][a][menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '[ul]',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false
)
--- End code ---
Look at the Line
--- Code: --- $aItemOpen = '[li][a][menu_title]</a>',
--- End code ---
This is the line which generates the opening of the Link, and outputs HTML like
<li><a href="#">the title</a>
You may change this like
--- Code: --- $aItemOpen = '[li]<a href="[url]" title="[page_title]">[menu_title]</a>',
--- End code ---
then you will get the title Attribute and by mouse-over you will get the page title.
Have Fun.
SM2 is not really hard, but you will have to study it with lots of practice.
Kind Regards,
Stefek
Navigation
[0] Message Index
Go to full version