Unread 08-23-2007, 01:16 PM
ggold
Posts: n/a
  #1  
Default Auto open a sub menu

Hi,

Is there a way that you can tell UDM to automatically open a submenu by putting something in the <ul> or <li>?

I have tried the x-snapshot module but I do not like it. Because it waits for the menu and page to load you get a short period before the menu re-opens.

As my menu list is generated from my CMS using PHP I know which sub menu should be open so if there was a way I could specify this initially that would be great.


Many thanks.
Reply With Quote
Unread 08-24-2007, 12:46 AM
bcarl314 bcarl314 is offline
Senior Member
Join Date: Aug 2007
Posts: 141
  #2  
Default

Depending on your set up, you could try the you-are-here extension on your udm menu:

http://www.udm4.com/demos/extension-youarehere.php
Reply With Quote
Unread 10-03-2007, 07:33 PM
jorge.aragon jorge.aragon is offline
Junior Member
Join Date: Oct 2007
Posts: 6
  #3  
Question

Hello,

would you please be so kind to help a new user?

How is it done with these two extensions?

I can not imagine, my programming skills are low.

Could you please post example code for this?

Best regards and many thanks for answering

Jorge
Reply With Quote
Unread 10-03-2007, 09:33 PM
bcarl314 bcarl314 is offline
Senior Member
Join Date: Aug 2007
Posts: 141
  #4  
Default

Can you clarify what you're looking to do? Which two extensions?

Thanks
Reply With Quote
Unread 10-05-2007, 01:58 PM
jorge.aragon jorge.aragon is offline
Junior Member
Join Date: Oct 2007
Posts: 6
  #5  
Default

Hello,

well, simple.

I want to open a submenu triggered by the url the user is coming to.

Try: http://www.aragon.ws/udm/index-frame.php

Try: http://www.aragon.ws/udm/index-frame.php?liga=primera
In this case I want to open "International" and "Primera DivisiĆ³n"
so that you know where you are.

Thats it.

Is there a way to manage this?

Best regards, Jorge
Reply With Quote
Unread 10-05-2007, 03:08 PM
bcarl314 bcarl314 is offline
Senior Member
Join Date: Aug 2007
Posts: 141
  #6  
Default

Thanks for the link. Unfortunately, the you-are-here extension doesn't really work so well with frame based pages. Its in the implementation notes:

http://www.udm4.com/menu/modules/you...mentationNotes

One thing you might be able to do is code the php to set the display property of the right elements to "block".

Maybe try this. At the top of the menu php file, add this...

Code:
<?php
        //the open array will contain a bunch of empty elements that you need to correspond to your menu
	$open = array(
		"International"=>"",
		"Champions"=>"" //add others as needed
		
	);
	if(isset($_GET['liga'])) {
                //here we reset the style to be block based on the value of the url parameter.
		switch($_GET['liga']) {
			case "primera":
				$open['International'] = " style='display:block;' ";	
				break;
			case "champion":
				$open['Champions'] = " style='display:block;' ";
				break;
		}	
	}
?>
Then in your UDM <ul> <li> list make changes like this....

Code:
  <li class="onclick" <?=$open['International']?>><a class="nohref">International</a>
  	<ul>

  		<li class="onclick"><a target="main_frame" href="/Ligen/SPORTAL/e_primera.php">E - Primera Divisi&oacute;n</a></li>
  		<li class="onclick"><a target="main_frame" href="/Ligen/e_segunda.php">E - Liga BBVA (Segunda Divisi&oacute;n)</a></li>
		...
		...
		...
  	</ul>
  </li>
  <li class="onclick" <?=$open['International']?>><a class="nohref">Champions League</a>
  	<ul>

  		<li class="onclick"><a target="main_frame" href="/Ligen/CHAMPIONS/champions_a.php">Gruppe A</a></li>
  		<li class="onclick"><a target="main_frame" href="/Ligen/CHAMPIONS/champions_b.php">Gruppe B - mit Schalke 04 &amp; FC Valencia</a></li>
		...
		...
  	</ul>
  </li>
Reply With Quote
Unread 10-05-2007, 04:11 PM
jorge.aragon jorge.aragon is offline
Junior Member
Join Date: Oct 2007
Posts: 6
  #7  
Default

Does not work.

see:

http://www.aragon.ws/udm/xphpmenue.php?liga=primera


????


Best regards, Jorge
Reply With Quote
Unread 10-17-2007, 11:16 AM
jorge.aragon jorge.aragon is offline
Junior Member
Join Date: Oct 2007
Posts: 6
  #8  
Default

Hello,

no ideas?

I am looking after the hint with the x-snapshot extension but can not imagine how to realize this.

Is there really no way? It would be quite useful for such an excellent menu system !

Best regards, Jorge
Reply With Quote
Unread 10-17-2007, 02:06 PM
Admin
Posts: n/a
  #9  
Default

One option would be to request some custom development to get the menu to work on your site. Let me know if you'd be interested in that.

http://www.udm4.com/contact/quote/
Reply With Quote
Unread 10-17-2007, 02:16 PM
jorge.aragon jorge.aragon is offline
Junior Member
Join Date: Oct 2007
Posts: 6
  #10  
Unhappy

Hello,

nice idea.... but I think this could be a general feature for many people.
As you see I was not the first one to ask this.

I will try to see how I go further...

Best regards
Jorge
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:48 AM.


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