snippet and now it correctly outputs the structure of my pages using ul/li html tags.
The problem is that the scripts/css/inline javascript needed by the DropDownNavigation macro are not included in my pages for some reason, so it just looks like a static menu with only the top level pages.
I have checked the RunwayDropdownNavigation.xslt file, and saw that it contains the following lines:
I figured this means that running the XSLT module will automatically add all needed css/script declaration and the inline javascript function call into the HTML document.
In the Runway pages it does work; the above elements are included in the HTML and the navigation works fine.
Another related thing .. if you remove the <form runat="server"> tag the dropdown navigation stops working. The reason for this is that in "dropdownnavigation.xslt" the following line requires the form tag.
I usually don't wan't the <form runat="server"/> tag on each and every page so if yo're like me and want to remove it, you need to put the initialization elsewhere. Add you own .js file to the master template and enter the following statement:
Using Runway DropDownNavigation with other pages
Hi, guys!
I'm new to Umbraco and I'm trying to build a website.
I have performed the following steps:
1. Installed the Runway foundation + DropDownNavigation macro
2. Created a different structure of Master pages, beside Runway's
3. Created a new structure of pages based on my master pages
4. In my top master page I have included the
snippet and now it correctly outputs the structure of my pages using ul/li html tags.
The problem is that the scripts/css/inline javascript needed by the DropDownNavigation macro are not included in my pages for some reason, so it just looks like a static menu with only the top level pages.
I have checked the RunwayDropdownNavigation.xslt file, and saw that it contains the following lines:
<xsl:value-of select="umbraco.library:AddJquery()"/> <xsl:value-of select="umbraco.library:RegisterJavaScriptFile('droppyJs', '/scripts/droppy.js')"/> <xsl:value-of select="umbraco.library:RegisterStyleSheetFile('droppyCss', '/css/dropdownnavigation.css')"/> <xsl:variable name="droppyJS">$(function() {$('#dropdownNavigation').droppy();});</xsl:variable>
I figured this means that running the XSLT module will automatically add all needed css/script declaration and the inline javascript function call into the HTML document.
In the Runway pages it does work; the above elements are included in the HTML and the navigation works fine.
In my pages it doesn't.
Any idea why that might be?
Thank you in advance.
Welcome to the forum and Umbraco.
Check if you <head> tag has a runat="server" attribute.
If it does, check if the rendered html includes the js references but they may be returning 404.
Chris,
Thank you very much for your quick response.
My problem was the missing runat attribute on the head tag. :)
Another related thing .. if you remove the <form runat="server"> tag the dropdown navigation stops working. The reason for this is that in "dropdownnavigation.xslt" the following line requires the form tag.
<xsl:value-of select="umbraco.library:RegisterClientScriptBlock('droppyJs', $droppyJS, true())"/>
I usually don't wan't the <form runat="server"/> tag on each and every page so if yo're like me and want to remove it, you need to put the initialization elsewhere. Add you own .js file to the master template and enter the following statement:
$(function() {$('#dropdownNavigation').droppy();});
/Jesper
is working on a reply...