Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 10:19:53 AM

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.
155492 Posts in 21710 Topics by 7738 Members
Latest Member: fo5azydk440me
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Adding title="LINKNAME" to generated menu links.  (Read 637 times)
myownalias

Offline Offline

Posts: 2


WWW
« on: April 03, 2009, 07:56:32 PM »

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.
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #1 on: April 03, 2009, 10:03:56 PM »

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
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
myownalias

Offline Offline

Posts: 2


WWW
« Reply #2 on: April 05, 2009, 02:29:00 AM »

Thanks for the reply Stefek,

I want to be able to add the title directly to the menu links generated by WB.

Jason.
Logged
mviens

Offline Offline

Posts: 57


« Reply #3 on: June 08, 2009, 08:56:31 PM »

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
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #4 on: June 08, 2009, 10:02:40 PM »

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
        
)


Look at the Line 
Code:
$aItemOpen      = '[li][a][menu_title]</a>',

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>',
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

Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
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!