You can also use the <conditonal> blockmarks for same.

On Fri, Feb 12, 2010 at 8:41 PM, Mark Radford <[email protected]> wrote:

> No problem.  Glad it worked  :)
>
> Mark
>
> On Feb 11, 4:12 pm, bobbykjack <[email protected]> wrote:
> > Brilliant. I could have sworn I tried that, but I guess I probably
> > left the ".Value" out - grrr....
> >
> > Thanks,
> >
> > - Bobby
> >
> > On Feb 8, 2:51 pm, Mark Radford <[email protected]> wrote:
> >
> >
> >
> > > I'd try the following:
> >
> > > <%!! Context:CurrentPage.Elements.GetElement(lst_events).Value.Count !!
> > > %>
> >
> > > I've used that for a container and it returns the number of items in
> > > the container.
> >
> > > Hopefully that's helpful?
> >
> > > Mark
> >
> > > On Feb 8, 1:19 pm, bobbykjack <[email protected]> wrote:
> >
> > > > Hi there,
> >
> > > > I have a tempate, containing a list, which is reused by a few pages.
> > > > Within that template, I wish to hide certain contents if there are no
> > > > items in the list. Since I can't just wrap the contents in a standard
> > > > RedDot conditional block, I need to use render tags.
> >
> > > > I'm using the method discussed previously on this group: looping
> > > > through the list and examining the result of the counter:
> >
> > > > <reddot:cms>
> > > > <foreach itemname="item"
> > > > object="Context:CurrentPage.Elements.GetElement(lst_events).Value"
> > > > countername="counter">
> > > >     <htmltext>Store:item[Int32:counter]</htmltext>
> > > > </foreach>
> > > > </reddot:cms>
> >
> > > > There are <%!! Store:counter !!%> (+ 1) items.
> >
> > > > However, if there are no items in the list at all, and the foreach
> > > > effectively doesn't execute, the counter appears to take its value
> > > > from the previous execution! I.e. if I switch between pages, my page
> > > > with an empty list uses the value of the previous non-empty list.
> >
> > > > Is there a way around this? Make 'Store' local to each page view, for
> > > > example?
> >
> > > > Regards,
> >
> > > > - Bobby
>
> --
> 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]<reddot-cms-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/reddot-cms-users?hl=en.
>
>

-- 
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