Please suggest me how I can find out if a container element is
connected or not.
I have to skip a block of code if the container is not connected.
Thanks,
Chandrakanth
Or failing that, what about Conditional block-marks?
Mark
On Jan 28, 12:19 pm, Chandrakanth Ramireddy <chandra.1...@gmail.com>
wrote:
If you just want to check to see if anything is connected you could
just surround it with a conditional block. Otherwise it will probobly
involve some rql to check the type of object the current page is
connected to.
On Jan 28, 12:19 pm, Chandrakanth Ramireddy <chandra.1...@gmail.com>
wrote:
This is the method I've used in the past:
<reddot:cms>
<if>
<query valuea="Context:CurrentPage.Elements.GetElement(con_MyContainer).Value[Int:0].Headline" operator="==" valueb="Escape:Null">
<htmltext><h1>There is no container</h1></htmltext>
</query>
<query type="else">
<htmltext><h2>There is a container here</h2></htmltext>
</query>
</if>
</reddot:cms>
It's a bit flakey as it requires you have a headline on a container to execute properly, but that's generally a safe assumption.
There may be a better way to accomplish this - and I'd be delighted to hear it!
thanks,
.dave
> --
> You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.
> To post to this group, send email to reddot-c...@googlegroups.com.
> To unsubscribe from this group, send email to reddot-cms-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
>
--
daveb