Re: [Radiant] Re: navigation_tags extension help
Ok, I will try to explain.I'm setting up a site that has a horizontal main menu at the top of the page (for this navigation_tags works perfectly). Then for each of these main pages that have children I want a submenu. example using Benny's page examples: If I have a main menu page /portfolio and this page has the children /portfolio/sexy_client and /portfolio/very_sexy_client I would like when I am on /portfolio and any of its children to see a menu showing the children of /portfolio. Hope this helps explain what I'm on about /Christian 2009/5/6 Mohit Sindhwani t...@onghu.com Christian Nikolajsen wrote: Thanks Benny, not quite as dynamic as I would have hoped. Are there currently any other extensions/ways/best practics out there to create a dynamic menu in radiant? /Christian Sorry Christian, I don't understand what you're trying to do. Could you explain with an example? Thanks Mohit. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant -- 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] Re: navigation_tags extension help
Christian Nikolajsen wrote: Ok, I will try to explain.I'm setting up a site that has a horizontal main menu at the top of the page (for this navigation_tags works perfectly). Then for each of these main pages that have children I want a submenu. example using Benny's page examples: If I have a main menu page /portfolio and this page has the children /portfolio/sexy_client and /portfolio/very_sexy_client I would like when I am on /portfolio and any of its children to see a menu showing the children of /portfolio. Hope this helps explain what I'm on about I think I have some idea! Is it only 2 level or do you want this to be multi-level? Cheers, Mohit. 5/7/2009 | 10:28 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] Re: navigation_tags extension help
Mohit Sindhwani wrote: Christian Nikolajsen wrote: Ok, I will try to explain.I'm setting up a site that has a horizontal main menu at the top of the page (for this navigation_tags works perfectly). Then for each of these main pages that have children I want a submenu. example using Benny's page examples: If I have a main menu page /portfolio and this page has the children /portfolio/sexy_client and /portfolio/very_sexy_client I would like when I am on /portfolio and any of its children to see a menu showing the children of /portfolio. Hope this helps explain what I'm on about I think I have some idea! Is it only 2 level or do you want this to be multi-level? Hi Christian I tried out what I thought you meant, so I prototyped it out in one of my experimental sites. Would you see the 2 pictures at: http://www.onghu.com/radiant_summer/captures/ - Is this what you want? The way I did it was using the following code in a snippet - this snippet is included in one of the layouts. div id=site_nav r:find url=/enr:children:each * r:link /r:if_ancestor_or_self ^ /r:if_ancestor_or_self/r:children:each /r:find /div div id=site_nav r:find url=/enr:children:each r:if_ancestor_or_selfr:children:each * r:link //r:children:each /r:if_ancestor_or_self/r:children:each /r:find /div (Actually, this code is slightly different from the one that I used to produce the screen shots. In the first block, I modified the line: * r:link /r:if_ancestor_or_self ^ /r:if_ancestor_or_self/r:children:each to include the part for ^ to show the main block that is selected. Let me know if this helps. Cheers, Mohit. 5/7/2009 | 10:57 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] Re: navigation_tags extension help
Christian Nikolajsen wrote: Thanks Benny, not quite as dynamic as I would have hoped. Are there currently any other extensions/ways/best practics out there to create a dynamic menu in radiant? /Christian Sorry Christian, I don't understand what you're trying to do. Could you explain with an example? Thanks Mohit. ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
[Radiant] Re: navigation_tags extension help
Hi Christian, That's currently not possible with the r:nav tag. For building your secondary navigation, you'll have to set the r:nav root manually on every 'index' page that needs a subnavigation. I.e.: / /about /products * /products/lorem /products/ipsum /products/dolor /portfolio * /portfolio/sexy_client /portfolio/very_sexy_client /team/ * = define r:nav here in an inherited page part If you really want to pass the current page's slug, it could be done fairly easy, but i suspect that on /product/lorem you actually want to pass /product/ as root? I don't think it's possible to find that out.. Regards, Benny Hello people, I have a question about the navigation_tags extension. I want to make a subnavigation menu, and I know I can tell it where to start by inserting to page slug in the root parameter. This works fine for my main navigation menu which I insert like this: r:nav root=/ include_root=true depth=1 expand_all=false ids_for_lis=true / But I would like this to be dynamic for my submenu. Is there a way to insert the current page's slug in the root parameter? -- Best Regards Christian Nikolajsen ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant