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.

Pagination URL's

December 07, 2007 11:16am

Subscribe [1]
  • #1 / Dec 07, 2007 11:16am

    seth.aldridge

    68 posts

    I’m sure I’ve read this before but searching the Forums, Docs, Wiki, and KB hasn’t turned up what I’m looking for.

    I don’t want the Pagination to return the url http://www.mydonain.com/P1 when using the Next and Previous buttons.  Is there a way to set it to go to the URL title?

    My goal is to have the buttons return the specific weblog URL title rather than P1, P2, P3, etc.

    Is this possible?

  • #2 / Dec 07, 2007 12:53pm

    Lisa Wess

    20502 posts

    Which type of pagination are you using? It sounds like you’re using general pagination when you really want next/prev pagination. Both are listed in the docs on the weblog entries tag.

  • #3 / Dec 07, 2007 4:06pm

    seth.aldridge

    68 posts

    Well I’m not using Single Entry pages for my weblogs.  We’re using short form entries and one per page so the weblog previous/next tags wouldn’t show up…unless there is a way to make every page like a static entry page?

    I would love to use those tags instead, but I’m currently using:

    {paginate}
    <div class="navigation">
    
        {if previous_page}« <a href="http://{auto_path}">Previous Page</a> {/if} 
        {if next_page} <a href="http://{auto_path}">Next Page</a> »{/if}
    
    </div>
    {/paginate}
  • #4 / Dec 07, 2007 4:08pm

    Lisa Wess

    20502 posts

    Well, if I understand, what you’re doing is essentially showing a multi-entry page, but limited to 1, so that it looks like a single-entry page; only it doesn’t have the url-title in the URL?

    You’ll need to do one or the other - single entry pages with the next/prev being the url title, or multi-entry pages with pagination by P0, etc.

  • #5 / Dec 07, 2007 4:19pm

    seth.aldridge

    68 posts

    I would prefer to do Single entry pages, but I guess I don’t really get the difference between the two?  Is there a parameter that I am missing?  Here is how I setup my weblog.  It’s being embedded in the Index template with the “site” Template Group.

    {exp:weblog:entries weblog="short" limit="1"}
    <blockquote>
        {cf_body}
    </blockquote>
    
    <div class="posted_in">Posted in: {categories backspace="1"}{category_name}, {/categories}</div>
    
    <br class="clear" >
    
    {paginate}
    <div class="navigation">
    
        {if previous_page}« <a href="http://{auto_path}">Previous Page</a> {/if}
        {if next_page} <a href="http://{auto_path}">Next Page</a> »{/if}
    
    </div>
    {/paginate}
    
    {/exp:weblog:entries}

    What can I change to make it use the homepage as a single entry page rather than multi-entry page?

  • #6 / Dec 07, 2007 4:22pm

    Lisa Wess

    20502 posts

    Have you read The Importance of Semantics?  The first article explains the difference - essentially, a single-entry page has the entry id or url title in the second or third segment.

    The homepage would be hard, unless you did a redirect of / to the latest entry, which would be difficult to do dynamically.  You could build the previous link yourself, which takes you to a single entry page, then use the next/prev pagination code.

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

ExpressionEngine News!

#eecms, #events, #releases