I have gone through the usual motions ie <%!!
Context:CurrentPage.Elements.GetElement(BannersContainer).HasChildren() !!
%>

But this does nothing, I havnt yet managed to get an output. All I
need is a true or false :(



On Sep 29, 3:00 pm, Joshua <[EMAIL PROTECTED]> wrote:
> On Sep 29, 9:33 am, tonyg <[EMAIL PROTECTED]> wrote:
>
> > Is there an easy way to check if a container has pages in it? I need
> > to do one thing if it has connected pages and another if it doesnt but
> > I cant seem to get it working?
>
> Depends what you mean by "easy". You can add a list element to the
> template that references the container. Use a pre-executing script
> block to iterate the list and set some VBScript value to true -- the
> iteration won't be executed if the list has nothing connected.
>
> <!IoRangePreExecute>
>   <%
>       bHasChildren = False
>       <!IoRangeList>
>           ' <%lst_Pages%>
>           bHasChildren = True
>       <!/IoRangeList>
>   %>
> <!/IoRangePreExecute>
>
> Then later in the template do your one thing if bHasChildren is true,
> and another if bHasChildren isn't true.
>
> This is an old-school solution... do any of the render tag gurus have
> a cleaner way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to