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.

Page number / ID - how is it assigned?

August 16, 2010 6:44pm

Subscribe [3]
  • #1 / Aug 16, 2010 6:44pm

    Regarding my problem below (that must be too puzzling for anyone to solve), I have this simpler question.

    When I add a new blog post, it gets the id “P0”, like here:
    http://www.theepisodes.org/index.php/episodes/P0

    It would be much better (for me) if the original/oldest listing was fixed at P0 and the newer ones added on to that.

    Is there a way to reverse this numbering system?

    Or am I just totally lost here….

    thanks

  • #2 / Aug 17, 2010 3:42am

    John Henry Donovan

    12339 posts

    Richard,

    A new entry gets an entry_id. What you have there is for Pagination

    Take for example this set-up

    A weblog called ‘episodes’
    A template group called ‘edition’
    A template within template group called ‘episode’

    I then add an entry to my episode weblog. This is automatically assigned an numerical entry id.

    Now to show a listing of all the episodes I have entered I add this to the edition/index template

    <ul>
    {exp:weblog:entries weblog="episodes" dynamic="off" limit="15"}
    <li><a href="http://{comment_entry_id_auto_path}">{title}</a></li>
    {/exp:weblog:entries}
    </ul>

    I am using the variable {comment_entry_id_auto_path}. There are more you can use but this will suit here. In your episode weblgo path preferences set “Comment Page URL” preference to http://www.theepisodes.org/index.php/edition/episode/


    Now on my template called ‘episode’ which is known as a single entry template I add this

    {exp:weblog:entries weblog="episodes" limit="1"}
    <h1>{title}</h1>
    Your episode custom fields here
    {/exp:weblog:entries}
    
    {exp:weblog:next_entry weblog="episodes"}
    
    Next entry: <a href="http://{id_path=edition/episode}">{title}</a>
    
    {/exp:weblog:next_entry}
    
    {exp:weblog:prev_entry weblog="episodes"}
    
    Previous entry: <a href="http://{id_path=edition/episode}">{title}</a>
    
    {/exp:weblog:prev_entry}

    Hopefully that clears up a few things for you. Obviously not everything is included above but it should give you the concept. let us know how you get on.

  • #3 / Aug 17, 2010 5:59am

    Thanks, 

    The problem occurs when I used the weblog ID, such as in this link:
    http://www.theepisodes.org/index.php/episodes/7/#comics

    When you go to this page,  the pagination does not come on, although it does work on this page otherwise:
    http://www.theepisodes.org/index.php/episodes/#comics

    I wonder why the pagination does not work when you arrive at the page from a link with a static weblog page called for

    Hm….

  • #4 / Aug 17, 2010 4:19pm

    Ingmar

    29245 posts

    The problem occurs when I used the weblog ID, such as in this link:
    http://www.theepisodes.org/index.php/episodes/7/#comics

    This is just a single weblog entry, nothing to paginate there. Pagination is only used on index style pages where a number of entries are shown. It doesn’t make sense on a template that only shows a single article to begin with.

  • #5 / Aug 17, 2010 4:46pm

    You’re not thinking of a weblog in the very generic terms that is meant for it by EE, which is surprising for an EE expert! And you probably didn’t look at my site.

    I use the weblog as a way to post a comic. I need a way (link) to send someone to the comic “index” page, but have it start at the beginning of the comic (if that’s the link they choose). AND then go from there to later ones from that same - very same - location (i.e., pagination).

    This can’t be an unusual demand. But I want to keep it all on that page, so how can I send someone to a page - to go to a specific entry, but not have it be, as you say, a single entry page? I can use the pagination address (/P4), but that changes everytime the number of pages increases.

    Thanks

  • #6 / Aug 17, 2010 6:12pm

    Ingmar

    29245 posts

    I use the weblog as a way to post a comic. I need a way (link) to send someone to the comic “index” page, but have it start at the beginning of the comic (if that’s the link they choose). AND then go from there to later ones from that same - very same - location (i.e., pagination).

    So you want to link from one single entry to the next one. That’s fine, it’s just not a case for pagination. Take a closer look at Next/Previous Entry Linking.

  • #7 / Aug 18, 2010 2:29am

    Have looked at that and used it in the past, but I don’t think it’s relevant here.

    I have a specific webpage for viewing my comic - when you go there the latest episode is featured and you can use the pagination to move see earlier comics. This works perfectly and is the perfect task for pagination.

    However, on the home page, I want to give visitors the option of going to the ‘comic’ page, but starting NOT with the latest comic, but rather from the beginning. To send them to that page, I use a link. But if I use a link with the actual ID of that first (original) comic, it rejects the pagination, thinking, this is just a one posting page.

    So, is there any way to send someone to this paginated page, (2) have the features comic be the original one, and (3), have the pagination working, so once they’ve seen the first comic the can go to the second; as it is now, if I use the page ID, they view the comic and then it’s DEAD - no pagination.

    Thanks

  • #8 / Aug 18, 2010 4:22pm

    Ingmar

    29245 posts

    But if I use a link with the actual ID of that first (original) comic, it rejects the pagination, thinking, this is just a one posting page.

    Yes, because that’s what it is. You’d get the same result with any weblog_id. And, yes, in that case pagination won’t work. I am afraid that’s just how EE works; which means you might have to rethink your approch a little. I still don’t see why using next / previous entry linking wouldn’t work.

    Moving to the CodeShare Corner.

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

ExpressionEngine News!

#eecms, #events, #releases