Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Dynamic NodeSelector for DDR menuDynamic NodeSelector for DDR menu
Previous
 
Next
New Post
8/3/2018 1:01 PM
 

Hi guys.
I need help with DDR menu.

This is my situation

Homepage
- Page1
--Subpage11
--Subpage12
- Page2
-- Subpage21
-- Subpage22

I need DDR menu on pages Page1 and Page2 to show its siblings.

What I tried to do is get parent tab name and feed it to ddr NodeSelector.

   string parentName = ((DotNetNuke.Entities.Tabs.TabInfo)PortalSettings.ActiveTab.BreadCrumbs[ 0 ]).TabName;

   <dnn:MENU ID="navPrimary" MenuStyle="nav/simple" NodeSelector="<%=parentName%>" runat="server"></dnn:MENU>

Variable parentName gets proper name, but DDR doesn't render anything. I cannot do with IDs as site has to be multilanguage and pagename will be same across all languages.

Can be done this way or I should seek another way of solving this problem.

Thanks for help!

 
New Post
8/3/2018 9:23 PM
 
Ivan Podrug wrote:

Hi guys.
I need help with DDR menu.

This is my situation

Homepage
- Page1
--Subpage11
--Subpage12
- Page2
-- Subpage21
-- Subpage22

I need DDR menu on pages Page1 and Page2 to show its siblings.

What I tried to do is get parent tab name and feed it to ddr NodeSelector.

   string parentName = ((DotNetNuke.Entities.Tabs.TabInfo)PortalSettings.ActiveTab.BreadCrumbs[ 0 ]).TabName;

  

Variable parentName gets proper name, but DDR doesn't render anything. I cannot do with IDs as site has to be multilanguage and pagename will be same across all languages.

Can be done this way or I should seek another way of solving this problem.

Thanks for help!

 

NodeSelector="<%#parentName%>"
 
New Post
8/16/2018 9:28 AM
 
Thank you Timo.

Sorry for late response, but just got back from vacation :)


I tried your solution but I get error:
error CS0103: The name 'parentName' does not exist in the current context

I still can render it with <%=parentName%>


What am I doing wrong?
Thanks for help!
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Dynamic NodeSelector for DDR menuDynamic NodeSelector for DDR menu


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out