In other words you want to reverse the sort order of post in the show topic
view?
Override the show action of the topics_controller (create a
topics_controller.rb in your app and copy the show action out of CE's). On
the line that says:
@posts = @topic.sb_posts.recent.find(:all, :page => {:current =>
params[:page], :size => 25}, :include => :user)
Change it to:
@posts = @topic.sb_posts.find(:all, :page => {:current =>
params[:page], :size => 25}, :include => :user, :order =>
'sb_posts.created_at DESC')
On Thu, Apr 16, 2009 at 10:16 AM, Alexis <[email protected]> wrote:
>
> Hello All,
> IMspirit wants to show the most recent forum posts at the top of each
> discussion topic. I have tried several times to make this happen but I
> have not yet been successful in identifying the correct code. Can
> anyone point me to the correct file? Thanks in advance, ~ Alexis
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CommunityEngine" 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/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---