Can i get the path of my links ?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Can i get the path of my links ?

Post by gerarcyr »

Hello,

I'm using the vertical plain text menu.
I would like to know if it's possible to get the path of my links ?

exemple :
Menu1
-submenu11
-submenu12
Menu2
-submenu21
-submenu22

If i click on submenu22, i would like to get the path of the link (menu2/submenu22")

Thank you in advance for your help
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Here is some code to generate bread crumbs:


mm_Separator=">";

function getYourAreHereArray()
{
_bC=[]
yaha=[]
if(_cip.length>0){
for(_c=0;_c<_cip.length;_c++){
_ci=_cip[_c];
_mni=getParentItemByItem(_ci);
if(_mni==-1)_mni=_ci
if(_mni+" "!=$u){
while(_mni!=-1){
_bC[_bC.length]=_mi[_mni][1]
_omni=_mni
_mni=getParentItemByItem(_mni);
if(_mni==_omni||_mni+" "==$u)_mni=-1
}
}
}
for(_c=_bC.length-1;_c>=0;_c--)yaha[yaha.length]=_bC[_c]
yaha[yaha.length]=_hx[_hx.length-1]
}
return yaha
}



youAreHereArray=getYourAreHereArray()

myOutput=""
for(_c=0;_c<youAreHereArray.length;_c++){
myOutput+=youAreHereArray[_c]
if(_c<youAreHereArray.length-1)myOutput+=mm_Separator
}

alert(myOutput)


Hope this helps
Milonic Support
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Post by gerarcyr »

Thk you.

But there is again 1 pb :

the result of this function is path>file.extension but i would like path>name of the item

like in my example:
menu1
- submenu11 (url=page11.htm)
- submenu12 (url=page12.htm)
menu2
- submenu21 (url=page21.htm)

if i click on submenu21, i would like to have menu2>submenu21 and not menu2>page21.htm
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Post by gerarcyr »

gerarcyr wrote:Thk you.

But there is again 1 pb :

the result of this function is path>file.extension but i would like path>name of the item

like in my example:
menu1
- submenu11 (url=page11.htm)
- submenu12 (url=page12.htm)
menu2
- submenu21 (url=page21.htm)

if i click on submenu21, i would like to have menu2>submenu21 and not menu2>page21.htm
and it doesn't work with iframe...
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Try this:

Code: Select all

mm_Separator=">";
	
	function getYouAreHereArray()
	{
		_bC=[]
		yaha=[]
		//alert(_cip)
		if(_cip.length>0){
			for(_c=0;_c<_cip.length;_c++){
				_ci=_cip[_c];
				_mni=getParentItemByItem(_ci);
				if(_mni==-1)_mni=_ci
				if(_mni+" "!=$u){
					while(_mni!=-1){
						_bC[_bC.length]=_mni
						_omni=_mni
						_mni=getParentItemByItem(_mni);
						if(_mni==_omni||_mni+" "==$u)_mni=-1
					}
				}
			}
			for(_c=_bC.length-1;_c>=0;_c--)yaha[yaha.length]=_bC[_c]
			yaha[yaha.length]=_cip[_cip.length-1]
		}
		return yaha
	}
	
	
	
	youAreHereArray=getYouAreHereArray()
	
	myOutput=""
	for(_c=0;_c<youAreHereArray.length;_c++){
		myOutput+=_mi[youAreHereArray[_c]][1]
		if(_c<youAreHereArray.length-1)myOutput+=mm_Separator
	}
	
	alert(myOutput)

I will need to see how you are implementing IFRAMES to be able to see how to get it to work for you. Do you have a URL I can see?
Last edited by Andy on Thu Nov 03, 2005 4:35 pm, edited 1 time in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Andy,

Will the mm_passItemRef do what is wanted?

Ruth
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Will the mm_passItemRef do what is wanted?
It might do...

gerarcyr!! - is http://support.milonic.com/demos/pass_i ... /index.htm of any use to you?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

gerarcyr, I'm fixing the download zip file right now, adding the new mm_passItemRef.js. For now you can get the new one here. Just replace the one in the zip file with that.

http://support.milonic.com/demos/pass_i ... ItemRef.js
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Post by gerarcyr »

Andy wrote:
Will the mm_passItemRef do what is wanted?
It might do...

gerarcyr!! - is http://support.milonic.com/demos/pass_i ... /index.htm of any use to you?
This is exacltly what i want.
I will try to use it.

Thanks a lot !
gerarcyr
Advanced
Advanced
Posts: 11
Joined: Thu Nov 03, 2005 11:44 am

Post by gerarcyr »

Andy wrote:
Will the mm_passItemRef do what is wanted?
It might do...

gerarcyr!! - is http://support.milonic.com/demos/pass_i ... /index.htm of any use to you?
This is exacltly what i want.
I will try to use it.

Thanks a lot !
Post Reply