Issue with Horizontal with drop down menu navigation
Hi,
i have developed a responsive website www.silatech.com on sitefinity 5.0. I used menu "Horizontal with drop down menu" and customized the HTML using jquery to make it responsive menu as I wished and it was working fine on all devices. Now I upgraded my site to 5.4 and the main menu works fine on browsers on PC's. But when it comes to tablet and smart phones like touch devices it behaves weired. It seems like there is some new javascript or HTML used on the 5.4 causing the issue.
Can any one please let me know what are the new addition in sitefinity 5.4. My plan is to strip offf any Javascript after page load.
Thanks in Advance.
Paul
Hi Paul,
The navigation widget and its javascripts haven't been changed since that version. However, since each mode of the navigation is based on a different RadControl (in your case RadMenu), most probably the RadMenu team has introduced the changes you're talking about. Unfortunately, in Sitefinity we use the RadControls from the Telerik.Web.Ui assembly and we don't have access to the code. This is why we can't provide you with such information.
Kind regards,@Paul
This might be a dumb coment, but 5.4 does not load jquery automatically. So you
a) got to make sure you load it yourself
b) make sure you do not double load it when you drag some widget to the page.
I use the following code in my .master.
But again your issue might be from a whole different corner.
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<
head
runat
=
"server"
>
<
sf:ResourceLinks
ID
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
JavaScriptLibrary
=
"JQuery"
/>
<
sf:ResourceFile
Name
=
"Telerik.Sitefinity.Resources.Scripts.jquery.fancybox.pack.v2.1.3.js"
/>
<
sf:ResourceFile
Name
=
"Telerik.Sitefinity.Resources.Scripts.jquery.cookie.js"
/>
</
sf:ResourceLinks
>
</
head
>
Paul,
That looks like the Zurb Foundation menu structure that you have added to the RadMenu. I have been tinkering around with creating a custom control that does not use the RadControls for the same menu.
I am curious how you went about adding the custom classes to the the RadMenu markup. (i.e. has-dropdowns, dropdown..etc.) I was under the impression that you would need to do a lot of extra groundwork to override the rendering of the built in RadControls so I am just curious if this is easier than I thought.
I used jQuery to rewrite the structure. It wasnt that hard I believe.
Paul
Hi Stacey,
On the ItemDataBound event you have access to all items from the navigation (depending on the control the event may be called NodeDataBound). This is where you can add additional css classes to the tabs with add.Attribute.
All the best,Thank you Jen,
I thought that by using my own ItemDataBound event that I would overwrite all the default rendering classes from Sitefinity. That is good to know.
I ended up with the solution that I wanted by using a custom control that I put together with some initial help from Steve McNiven's StaticMenu.
Hi Stacey,
I'm glad to hear you found a solution, suitable form your case.
Kind regards,