Hello RedDot CMS Group Members,
I'm working on a template which is capable of using render tags to
return key element information from a component page instance which -
in turn - is connected to a container within a child page. So far,
I've managed to return the required information using the following
render tags:-
<ioRangeList>
<!-- <%lst_pageNavigation%> -->
<% eventName = "<%!! Context:CurrentPage.Elements.GetElement
(lst_pageNavigation).Value[Int32:0].Elements.GetElement(con_Body).Value
[Int32:0].Elements.GetElement(stf_EventName).Value !!%>" %>
<% eventFromDate = "<%!! Context:CurrentPage.Elements.GetElement
(lst_pageNavigation).Value[Int32:0].Elements.GetElement(con_Body).Value
[Int32:0].Elements.GetElement(stf_EventFromDate).Value !!%>" %>
<% eventToDate = "<%!! Context:CurrentPage.Elements.GetElement
(lst_pageNavigation).Value[Int32:0].Elements.GetElement(con_Body).Value
[Int32:0].Elements.GetElement(stf_EventToDate).Value !!%>" %>
<% eventLocation = "<%!! Context:CurrentPage.Elements.GetElement
(lst_pageNavigation).Value[Int32:0].Elements.GetElement(con_Body).Value
[Int32:0].Elements.GetElement(stf_EventLocation).Value !!%>" %>
</ioRangeList>
This works mostly fine, except it has one problem: It only returns
information on the the FIRST page in the list (from the: GetElement
(con_Body).Value[Int32:0] part of the render tag <-- the index number
being: 0)
I need to be able to substitute some index constant / variable that
the render tag understands, which represents the current index, so
that as these render tags are referenced within a standard list loop,
the index is automatically incremented by a value of: 1 and the
correct element information is therefore returned.
Unfortunately, it appears that the standard index objects
(CurrentIndex, FirstIndex and LastIndex) can only be used within
navigation templates and this is not a navigation manager template.
The only other way I could think of doing this, would be to
dynamically construct the render tag, inserting a counter variable
like this:-
<%
currentCounter = 0
do
<% eventToDate = "<%!! Context:CurrentPage.Elements.GetElement
(lst_pageNavigation).Value[Int32:"
& currentCounter &
"].Elements.GetElement(con_Body).Value
[Int32:0].Elements.GetElement(stf_EventToDate).Value !!%>" %>
'
currentCounter = currentCounter + 1
'
loop
%>
... but I haven't found a syntax that does not generate an error 500.
suggestions?
Thanks and Regards
Phil
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---