Unread 08-02-2007, 10:57 AM
cbataglio cbataglio is offline
Junior Member
Join Date: Aug 2007
Posts: 2
  #1  
Default Make top level menu item "selected" like a tab...

hello

i'd like to configure my udm menu such that a class like "selected" can be used to allow a top level link to be "higlighted" when on a specific site page, sort of like an active tab... can this be done?... any advice on how this can be done?

thanks
Reply With Quote
Unread 08-02-2007, 02:54 PM
bcarl314 bcarl314 is offline
Senior Member
Join Date: Aug 2007
Posts: 141
  #2  
Default

Yep, this can be done with the "you are here" extension.

http://www.udm4.com/menu/modules/youarehere/
Reply With Quote
Unread 08-03-2007, 04:50 PM
cbataglio cbataglio is offline
Junior Member
Join Date: Aug 2007
Posts: 2
  #3  
Default not sure how to configure

Hi,

I downloaded the .js and I am looking at the instructions, but I am not really clear...

How to I configure the .js params? I can't make heads or tails of the instructions. Do you have a working code example I can look at?

Also, into what file would I copy and paste the additional .CSS style code?

Thanks

Charles
Reply With Quote
Unread 08-06-2007, 06:56 PM
bcarl314 bcarl314 is offline
Senior Member
Join Date: Aug 2007
Posts: 141
  #4  
Default

The first thing you will need to do is add the javascript to your pages.

Put this AFTER all your other udm body script calls.
Code:
<!-- you are here extension -->
<script type="text/javascript"
	src="/udm-resources/udm-x-youarehere.js"></script>
Next, you will need to configure the javascript file. Open the udm-x-youarehere.js file. There are only 5 configuration options...

Code:
var youAreHere = [
	'index.php',                 // default page name [eg "index.php", "default.html" etc]
This is the "default" page for a directory. Usually this is index.html, index.htm, or similar. This is the page that would be loaded when you time http://www.example.com/somedirectory/ as this actually loads http://www.example.com/somedirectory/index.html

This is needed so the script knows that it's supposed to highlight / select the right menu item.

Code:
	'You are here: ',            // add text to here-page title ["text"|"none"]
This is text that can be added to the current page in the menu when you mouse over the item. It is optional and can be removed.

Code:
	'You are in this branch: ',  // add text to here-branch title ["text"|"none"]
This is the text that can be displayed when you mouse over a "parent" item in the menu. Also optional.

Code:
	'before',                    // where to add title text ["before"|"after"]
For the previous two options, you may have the title "prepended" (before) or "appended" (after) the default text. To see these in use, go to http://www.udm4.com/menu/modules/youarehere/ . When you mouse over the "About" menu, you'll see the hover text "You are in this branch: About UDM", when you open a submenu and get to the "Modules and Extensions" you will see the "You are here:" title text.

Code:
	'no',                        // open here-branch menus automatically ["yes"|"no"]
Setting this option to "yes" will auto-expand the menu on page load. This works best if the menus are not "flyout" style menus.

Hope this answers any questions.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 09:57 AM.


Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.