Hi Joel,

Regarding the first method: 
GetElement(anc_link).Value[Int:0].Id fails if anc_link references a link 
instead of a page.  Plus, you will run into cache issue with this method.

Second method: getting really close, but <%anc_link%> cannot be inside a if 
statement because the & generated as part of the link breaks the rendertag.

However, you are just sooooooo close!

Solution:
<!IoRangeConditional><a href="<%anc_link%>"><!/IoRangeConditional><
%img_photo%><!IoRangeConditional></a><!-- <%anc_link%> --><
!/IoRangeConditional>


On Wednesday, December 5, 2012 10:10:51 AM UTC-5, Joel Kinzel wrote:
>
> All,
>
> I have a list with several followings pages that have an anchor element on 
> them, sometimes it has a page connected/referenced, and other times not: 
>
> List
>    Page A (anchor has page connected/referenced)
>    Page B (anchor does not have page connected/referenced) 
>    Page ...
>    Page N
>
> I have the following code for my list: 
>         <li><!IoRangeNoRedDotMode><!IoRangeRedDotMode><!--<%lst_banners%
> >--><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
>         <reddot:cms>
>             <if>
>                 <query 
> valuea="Context:Pages.GetPage(<%info_guid%>).Elements.GetElement(anc_link).Value[Int:0].Id"
>  
> operator="!=" valueb="">
>                     <htmltext><a href="<%anc_link%>"><%img_photo%
> ></a></htmltext>
>                 </query>
>                 <query type="else">
>                     <htmltext><%img_photo%></htmltext>
>                 </query>
>             </if>
>         </reddot:cms></li>
>
> I've also tried several other iterations of this (like so):
>
>         <li><!IoRangeNoRedDotMode><!IoRangeRedDotMode><!--<%lst_banners%
> >--><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
>         <reddot:cms>
>             <if>
>                 <query valuea="<%anc_link%>" operator="!=" valueb="">
>                     <htmltext><a href="<%anc_link%>"><%img_photo%
> ></a></htmltext>
>                 </query>
>                 <query type="else">
>                     <htmltext><%img_photo%></htmltext>
>                 </query>
>             </if>
>         </reddot:cms></li>
>
> Whenever I do either of these, one image shows up and the other doesn't. 
> Depending upon what value I test, either the image that should be linked 
> shows up, or the one that is not linked shows up, but I can't seem to get 
> them both to show up (meaning something always fails). Any ideas on what 
> I'm doing wrong here?
>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/reddot-cms-users/-/B9lKxym9ojoJ.
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