ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

An Event RSS feed

December 02, 2007 8:06pm

Subscribe [1]
  • #1 / Dec 02, 2007 8:06pm

    sycogo

    6 posts

    Hi.  I want to create an event rss feed that always lists the last posted event at the top.  If you order by date, however, it orders entries by the date the event is happening on rather than the date it was posted.  Ideally there would be the option of putting orderby=“entry_id” as a weblog parameter so that the latest posting showed at the top rather than the soonest occurring event.  Any ideas?

  • #2 / Dec 03, 2007 11:16am

    Robin Sowell

    13255 posts

    Let’s see- two ways to go at it.

    1.  Add a custom field ‘posted date’- use that to indicate the date an event is posted- and you can sort on a custom field so that would do the trick.  Could even write an extension to automatically add the current time for you when an entry is initially posted.

    2.  If all you want to do is sort by entry id?  Instead of using the weblog module, use the query module and write a custom query to pull back you data.  Not killer hard- and you could sort on entry_id in a custom query.

  • #3 / Dec 03, 2007 3:18pm

    sycogo

    6 posts

    Thanks for this.  In the end I plumped for the second option as it seemed the more elegant solution and it’s great.  However, I then realised that one of the fields I wanted to display was a relationship field and I just can’t get my head around how to make this work.  I tried putting a reverse_related_entries tag within the sql tags but that just doesn’t work.

    And idea how to do this?  Could I nest another pair of query tags within the original set?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases