Hi Rob, So your navigation is doing fine, it is just you end up with <ul> </ul> or <div class="has-sub"> </div>, with no sub rendered. Having no sub rendered is exactly what you want, but you also don't want to parent has sub status.
Context:CurrentIndex.HasChildren() will not do it for you because the check is more involved than check if has children. The check has to include if none of the children are rendered because they don't meet requirement. Despite my active avocation for not using preexecution inside a project, this is one instance where the preexecution solution is better than rendertag. Preexecution will work, you just have to figure out why it is not working in your case. Anyways, here is a solution, with explanation why this will not end well. You can use the Store:Set( key, val ) functionality, but you really should not because the headaches you will face explained here http://simplyreddot.blogspot.com/2012/03/rendertag-project-performance-product.html Solution I would recommend: render as it is right now, use JQuery to look for those empty/fake [ + ] parents nav items and remove. On Wednesday, September 10, 2014 11:58:00 AM UTC-4, Hilmar Bunjes wrote: > > Hi Rob, > I think you are looking for this Rendertag; > > <if> > <query valuea="Context:CurrentIndex.HasChildren()" operator="==" > valueb="Bool:True"> > ... > </query> > </if> > > Best, > Hilmar > > Am Dienstag, 9. September 2014 18:22:26 UTC+2 schrieb Rob Wagner: >> >> We have an option element on all foundation pages which allows the >> contributor to determine whether that page should appear in the navigation >> list. We check for that element in the nav templates and don't display a >> link if it's not supposed to be there. We also have a cute little button >> that toggles the display of sub-pages. >> >> However, we've got a few sections (enough that it's not a corner case we >> can ignore) where NONE of the sub pages are intended to render, but the >> toggle button still appears. >> >> What we're looking for is a way to "look ahead" at the sub-pages and, if >> at least one is intended to appear, show the toggle button before moving to >> the next level's template. >> >> It looks like we can look through sub-ages using render tags, but we >> can't figure out how to initialize and then update a variable. We've tried >> pre-executing script, but it seems to break within the nav templates. >> >> Any thoughts? >> > -- You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/reddot-cms-users. For more options, visit https://groups.google.com/d/optout.
