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.

Counting entries per date header

June 04, 2011 8:10pm

Subscribe [3]
  • #1 / Jun 04, 2011 8:10pm

    InstantB

    9 posts

    Hello -

    Rather than getting a total COUNT of query results, I want to get a count of blog entries for each day as organised with a date header. I’m wanting to be able to apply a different div class to every fifth entry, on each day of results. Hope that makes sense.

    I’m still using EE 1.6.9.

    Thanks for your help.

  • #2 / Jun 04, 2011 9:37pm

    Kernon

    173 posts

    You could do this with PHP (set to parse on output); perhaps someone else knows of a plugin that would also accomplish it as well.

  • #3 / Jun 06, 2011 5:44am

    John Henry Donovan

    12339 posts

    InstantB,

    There is nothing native that is going to help you there I’m afraid. There is the {switch} variable for grabbing every 5th entry but for that to work you would need every day to have multiples of 5 entries each. Other than that you may need the query module or you could use JavaScript to count the entries per day maybe.

    If you wish I can move this thread to Community Help to open it out to more members to reply?

  • #4 / Jun 06, 2011 6:09am

    InstantB

    9 posts

    Many thanks for your suggestions. Once I worked out there wasn’t a native solution I went down the PHP route which ended up being more elegant than I thought it would be.

  • #5 / Jun 06, 2011 6:50am

    John Henry Donovan

    12339 posts

    Good stuff 😊 Thanks for updating us. Feel free to start a new thread if you have any more questions

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

ExpressionEngine News!

#eecms, #events, #releases