cancel
Showing results for 
Search instead for 
Did you mean: 

ok, here's how to sort topics in a forum by created date

stk137
Champ in-the-making
Champ in-the-making
I figured out way to sort topics by create date.  Although I'd really like to sort them by the date of their last post (most recent child).  If anyone has an idea on how please share.

Until then, here's how to sort topics in a forum by created date.

add this forum.jsp
(I added it after the Replies column)


<%– Created column - added to supporting sorting topics by date –%>
<a:column style="text-align:left">
<f:facet name="header">
<a:sortLink label="#{msg.created}" value="replies" styleClass="header"/>
</f:facet>
<h:outputText value="#{r.created}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
</h:outputText>
</a:column>


add this to web-client-config-custom.xml

<!– changing default sort of topics in a forum to descending created date.  
       Note: this depends on the enhanced forum.jsp page –>
<config evaluator="string-compare" condition="Views">
      <views>
         <view-defaults>
            <forum>
               <sort-column>created</sort-column>
               <sort-direction>descending</sort-direction>
            </forum>
         </view-defaults>
      </views>
   </config>
1 REPLY 1

stk137
Champ in-the-making
Champ in-the-making
oops

value="replies"

should be

value ="created"