separate page and menu names
Last Post 08/28/2012 12:21 PM by Joseph Craig. 6 Replies.
Author Messages Not Resolved
Stephen
Nuke Pro
Nuke Pro
Posts:86


--
05/29/2012 8:32 AM  
Hello,

Is it possible to set the menu text for a page independently of the page name?

I would like my page names to follow this convention:
mypage[ID].aspx where [ID] is a unique identifier
Resulting in something like this: mypage1.aspx, mypage2.aspx, mypage3.aspx etc.

But I don't want 'mypage1' for example as the menu text but it's taken from the pagename and I can't see how to change that.

Steve
Joseph Craig
DNN MVP
Posts:11667


--
05/29/2012 10:16 AM  
Yes, it is possible.

You can do this with the DDR Menu (the standard DotNetNuke menu) but you will have to create a custom template that uses the "Page Title" rather than the "Page Name" in constructing the menu. It turns out that this is actually not to difficult to do ...

I'll illustrate using the DNNStandard template. This is the menu used in the Dark Knight skins with Standard in their name.

So, look in Portals/_default/skins/DarkKnight. You will find a folder there named DNNStandard. Copy that folder and paste it back, naming it DNNStandard-save so that you can get it back if you need to do that.

In the DNNStandard folder, edit the file named ULTokens.txt and replace every instance of "TEXT" with "TITLE" and you are done. Now, the "Standard" menu will use the Page Title for the menu item text. One caution: you will need to go through and give EVERY page a Page Title, or what will be shown is an empty string for those menu items.

-----------------
Now ,,, this is a simple example. You can do something similar with any of the other DDR Menu templates. You will quickly discover that some of the other templates are built differently. For example, the Mega menu uses XSLT to generate the menu entries. You'll need to replace @text with @title there. With and XSLT menu you also have the possibility of using @text in the event that @title is blank.

There is much more about customizing the DDR Menu in the DotNetNuke Wiki at DotNetNuke.com. Search in the Wiki for "DDR Menu."

Joe Craig, Patapsco Research Group
Complete DNN Support
Stephen
Nuke Pro
Nuke Pro
Posts:86


--
05/29/2012 11:41 AM  
Hi Joe,

Many thanks for your reply.

I used a product called Morpheus with SkinLab by Nukeville. The Nukeville.Morpheus skins directory doesn't contain any files like ultokens.txt

So will have to contact them unless there's a kind of default ultokens.txt file?

Steve
Joseph Craig
DNN MVP
Posts:11667


--
05/29/2012 2:06 PM  
I don't know which menu is used in SkinLab. I'd suggest that you contact Nukeville and ask them how to do it with their tools.

Joe Craig, Patapsco Research Group
Complete DNN Support
matay matay
Nuke Newbie
Nuke Newbie
Posts:1


--
08/28/2012 6:25 AM  

Posted By Steve on 2012-05-29 11:41 AM
Hi Joe,

Many thanks for your reply.

I used a product called Morpheus with SkinLab by Nukeville. The Nukeville.Morpheus skins directory doesn't contain any files like ultokens.txt

So will have to contact them unless there's a kind of default ultokens.txt file?

Steve


hello, i want to display page menu in arabic language and url is english, i changed the [=TXT] TO [=TITLE] in ULTokens.txt file , but it is not working? did i done wrong ? how to fix this problem please?
Stephen
Nuke Pro
Nuke Pro
Posts:86


--
08/28/2012 9:39 AM  
Hello Matay,

You say you changed [=TXT] TO [=TITLE] but as far as I remember you need to change every instance of 'TEXT' (not TXT) to TITLE.

Also, did you give every page a title?

I'm not sure about displaying the arabic character set though.

Steve
Joseph Craig
DNN MVP
Posts:11667


--
08/28/2012 12:21 PM  
ULTokens.txt constructs links that look like this:

 
<a href="[=URL]">[=TEXT]</a>


If you switch the menu to use the DumpXML template, you will see the XML file that is uses as input to the ULTokens.txt, so you should be able to trace the inputs and the final output of the menu links. The XML file contains "nodes" that look like this:

<node id="172" text="Home" title="My Home Page" url="http://jncraig.com/test/Home/tabid/172/Default.aspx" enabled="1" selected="0" breadcrumb="0" separator="0" first="1" last="0" only="0" depth="0" />


"text" corresponds to "Page Name" in the Page Settings.
"title" corresponds to "Page Title".

Joe Craig, Patapsco Research Group
Complete DNN Support


---