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.

Display Entry Number?

September 25, 2008 9:30pm

Subscribe [4]
  • #1 / Sep 25, 2008 9:30pm

    soxhead

    69 posts

    I have a good reason for this, I’m not trying to be difficult:)

    I would like to display the entry number next to each post (this number will be different than the entry_id).

    So let’s say I have a weblog called ‘jokes’ and I have 20 entries in that weblog. I’d like to display the number 20 next to the latest entry and 1 next to the oldest. I’d like to do this on single entry pages as well as multi-entry pages.

    Ideally, I’d also like to number all entries across all weblogs in certain situations (again, this number would be different than the entry_id).

    Any thoughts on how I could do this?

  • #2 / Sep 26, 2008 3:10pm

    Britizen

    36 posts

    Quick answer - you can use the {total_entries} and {count} variables to create these….

  • #3 / Sep 26, 2008 4:17pm

    soxhead

    69 posts

    Wouldn’t {count} always return 1 on a single entry page?

  • #4 / Sep 26, 2008 4:39pm

    Andy Harris

    958 posts

    Why don’t you just create a new custom field and put the value in there? It obviously won’t auto increment and you’ll have to manually insert the number, but it’s the easiest way I can think of to retrieve a number on a single page.

  • #5 / Sep 26, 2008 4:48pm

    soxhead

    69 posts

    I was hoping to avoid that:) I’ll do it if I have to, but I’d have to go back through almost a thousand entries and add the value.

    I’ll do it if that’s what it takes, I was just hoping there was another way to go about it.

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

ExpressionEngine News!

#eecms, #events, #releases