Pages

Thursday, January 31, 2013

Foreach Rendertag in Text Array Processing

<reddot:cms>
<foreach itemname="ArrayItem" object="Escape:Text(Test1,Test2).Split(Escape:Text(,))">
 <htmltext>
  <h2><%!! Store:ArrayItem !!%></h2>
 </htmltext>
</foreach>
</reddot:cms>

3 comments:

  1. Hi,

    Not able to get "Page element values using pageGUID", when I am using "Store tag" in for loop.
    <%!! Store:ArrayItem[Int32:counter].Elements.GetElement(con_body).Value[Int32:0].Elements.GetElement(txt_abstract).Value !!%
    "Page GUID" is used as "ArrayItem".

    Can you please help on this

    ReplyDelete
  2. We are trying to implement rendertags for a section

    In a placeholder "<%stf_guid2%>", we are having a comma seperated Page GUID values. We need to get some elements from the page and i have tried as below mentioned.
    As you mentioned the code splits the value and iam getting GUID. But iam not able to get the values using "Store:Item". Can you please help us on this.



    <%!! Store:ArrayItem !!%>
    URL:<%!! Context:Pages.GetPage(Guid:Store:Item).GetUrl(Bool: True) !!%>
    Headline:<%!! Store:Item[Int32:ArrayItemCounter].Headline !!%>
    Element:<%!! Store:Item.Page.Elements.GetElement(con_banner).Value[Int32:ArrayItemCounter].Elements.GetElement(stf_subtitle).Value !!%>
    <%!! Store:Item.Page.GetElementByName(con_body).Value[Int32:ArrayItemCounter].GetElementByName(txt_abstract).GetHtml() !!%>



    ReplyDelete