I've hit the same problem recently.

The way I solved it was to load the render tag results into a multi-
dimensional array and then use ASP to sort the array result by my
preferred sort order (ascending / descending).

First - run a <foreach> loop to get the number of elements and use
this to create your initial array.

<reddot:cms>
<foreach itemname="item"
object="Context:CurrentPage.Elements.GetElement(anc_auditHome).Value"
countername="itemCounter">
</foreach>
</reddot:cms>
<%
Dim MyArray(<%!! Store:itemCounter !!%>,2)
MyCounter = 0
%>

Next - run another <foreach> loop to load your array

<reddot:cms>
<foreach itemname="item"
object="Context:CurrentPage.Elements.GetElement(anc_auditHome).Value"
countername="itemCounter">
<htmltext>
<%
   MyArray(MyCounter,0) = "<%!! Store:item[Int32:counter].GetUrl() !!
%>"
   MyArray(MyCounter,1) = "<%!! Store:item
[Int32:counter].Elements.GetElement(hdl_title).Value !!%>"
   MyCounter = MyCounter + 1
%>
</htmltext>
</foreach>
</reddot:cms>

Next - sort your array using your favourite sort function (we use a
modified version of the 4guysfromrolla.com version, available at:
http://www.4guysfromrolla.com/webtech/012799-3.shtml).

<%
Const Col = 1 'Set this to: 0=sort by URL, 2=sort by headline
Call QuickSort(MyArray,0,MyCounter-1,col,"ORDER_ASC") 'this would sort
array by headline in ascending order
%>

Lastly, render the result.

<%
     for i = 0 to MyCounter-1
         response.write "<a href=" & MyArray(i,0) & ">" & MyArray(i,1)
& "</a>"
     next
%>

It's a bit of a hassle to setup, but once you have it working, it's a
useful approach.

Hope that's of use...

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