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.

Grouping by arbitrary date field / loading channel entry results in plugin

January 31, 2012 2:07pm

Subscribe [1]
  • #1 / Jan 31, 2012 2:07pm

    thudfactor

    4 posts

    So, I’m trying to group entries by month, so you have a month header, then a list of posts in that month. Like this person.

    The client wants to keep track of when the record was created in the CMS (using entry_date) but sort based on the actual run date of an article, set as an additional channel date field. We suggested monkeying with the entry date, but that’s not structured enough for them. (Truth to tell, it’s not structured enough for me.)

    I could do this in a plugin, but I can’t figure out a way to get the members of the current {exp:channel:entries} result set. Is there a way I can do that? Then it’s a matter of comparing the value of the previous or next row’s date to the current row’s date.

     

  • #2 / Feb 01, 2012 3:45pm

    Dan Decker

    7338 posts

    Hi thudfactor,

    If you are wanting to know the author of a given entry, you need the author_id variable. author_id is returned with the channel entries tag. This is stored in the database in exp_channel_titles and can be JOINed on exp_channel_data using entry_id for the purposes of your plug-in.

    Please let me know if I can provide any other information.

    Cheers!

  • #3 / Feb 02, 2012 11:26am

    thudfactor

    4 posts

    Thanks, Dan, but I don’t think that really addresses my question, which is how to achieve the effect of {date_heading} except grouping by an arbitrary date field rather than the post entry date.

    It’s possible that this should have been in a community forum rather than the tech support forum.

  • #4 / Feb 05, 2012 8:43am

    Sean C. Smith

    3818 posts

    thudfactor,

    Yes, since that isn’t available with ExpressionEngine out of the box then I would suggest moving to community support or if you have the php skills writing your own add-on to achieve your goal.

    Would you like me to move the thread for you?

    Sean

  • #5 / Feb 05, 2012 9:08am

    thudfactor

    4 posts

    Yes, please. Thanks!

  • #6 / Feb 07, 2012 7:34pm

    Sean C. Smith

    3818 posts

    Hi,

    I have moved this thread to Community Support for you.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases