Re: [Radiant] Navigation Menu with Sub Nav
You can try this snippet: div id=menu r:find url=/en ul r:children:each li r:link / r:if_children ul r:children:each li r:link / /li /r:children:each /ul /r:if_children /li /r:children:each /ul /r:find /div With some css this will generate a good navigation menu. Rafael Souza On Thu, May 14, 2009 at 2:21 AM, Mohit Sindhwani t...@onghu.com wrote: Christian Nikolajsen wrote: Aha! Found the culprit, you were right it is navigation_tags causing my grief. Thanks for the help. /Christian Glad to know! Now, it's time for someone to add this to the wiki :P *hint hint* Cheers, Mohit. 5/14/2009 | 1:21 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Navigation Menu with Sub Nav
For other noobs like me that are looking at how to create a navigation menu with sub nav, here is an example I created below. I couldn't get r:navigation to do it or the navigation_tags extension to work properly. I'm sure there is a better way to do this so please offer your suggestions on how to do this if you know of a better way. ul r:find url=/ r:children:each r:unless_content part=no-nav r:if_ancestor_or_self r:if_self li class=currentr:link / /r:if_self r:unless_self li class=current with-childrenr:link / /r:unless_self r:if_children ul r:children:each r:if_self li class=currentr:link //li /r:if_self r:unless_self lir:link //li /r:unless_self /r:children:each /ul /r:if_children /li /r:if_ancestor_or_self r:unless_ancestor_or_self lir:link //li /r:unless_ancestor_or_self /r:unless_content /r:children:each /r:find /ul ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Christian Nikolajsen wrote: Hi Mohit sorry I never got back to you on your example. I tried it out and it's been causing problems for me and I'm getting the same problems with the example from Dan. When I try your examaples I get the following error message: NoMethodError in SiteController#show_page You have a nil object when you didn't expect it! The error occurred while evaluating nil.url Any thoughts on this would be appreciated (and again my apologies to Mohit for not answering him on his last post :) Hi Christian It seems to be that one of the finds is failing or something. Could you post the exact snippet you are using? Cheers, Mohit. 5/14/2009 | 11:37 AM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Hi Mohit, A thought occured to me and I tried your code on a clean radiant install and it works perfectly. Both yours and Dans code example. Maybe some extension I have installed is causing the trouble? These are the extenstions I have installed: copy_move mailer settings dashboard navigation_tags sns drag_order news user_home help paperclipped wym_editor_filter /Christian 2009/5/14 Mohit Sindhwani t...@onghu.com Christian Nikolajsen wrote: Hi Mohit sorry I never got back to you on your example. I tried it out and it's been causing problems for me and I'm getting the same problems with the example from Dan. When I try your examaples I get the following error message: NoMethodError in SiteController#show_page You have a nil object when you didn't expect it! The error occurred while evaluating nil.url Any thoughts on this would be appreciated (and again my apologies to Mohit for not answering him on his last post :) Hi Christian It seems to be that one of the finds is failing or something. Could you post the exact snippet you are using? Cheers, Mohit. 5/14/2009 | 11:37 AM. -- Venlig hilsen / Best Regards Christian Nikolajsen Tech Trooper of CreatingSite e-Commerce Mobile: +45 30624263 Mail: christ...@nikolajsen.net ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Christian Nikolajsen wrote: Hi Mohit, A thought occured to me and I tried your code on a clean radiant install and it works perfectly. Both yours and Dans code example. Maybe some extension I have installed is causing the trouble? These are the extenstions I have installed: copy_move mailer settings dashboard navigation_tags sns drag_order news user_home help paperclipped wym_editor_filter I can tell you that copy_move and settings definitely seem to work with it because I have those installed. Could it be that navigation_tags causes some problem? I'm really not sure what could cause the trouble because my code uses built-in Radiant tags so technically that should work in all cases :P Cheers, Mohit. 5/14/2009 | 12:59 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Aha! Found the culprit, you were right it is navigation_tags causing my grief.Thanks for the help. /Christian 2009/5/14 Mohit Sindhwani t...@onghu.com Christian Nikolajsen wrote: Hi Mohit, A thought occured to me and I tried your code on a clean radiant install and it works perfectly. Both yours and Dans code example. Maybe some extension I have installed is causing the trouble? These are the extenstions I have installed: copy_move mailer settings dashboard navigation_tags sns drag_order news user_home help paperclipped wym_editor_filter I can tell you that copy_move and settings definitely seem to work with it because I have those installed. Could it be that navigation_tags causes some problem? I'm really not sure what could cause the trouble because my code uses built-in Radiant tags so technically that should work in all cases :P Cheers, Mohit. 5/14/2009 | 12:59 PM. -- Venlig hilsen / Best Regards Christian Nikolajsen Tech Trooper of CreatingSite e-Commerce Mobile: +45 30624263 Mail: christ...@nikolajsen.net ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Re: [Radiant] Navigation Menu with Sub Nav
Christian Nikolajsen wrote: Aha! Found the culprit, you were right it is navigation_tags causing my grief. Thanks for the help. /Christian Glad to know! Now, it's time for someone to add this to the wiki :P *hint hint* Cheers, Mohit. 5/14/2009 | 1:21 PM. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant