Answers.Body: <p>I don't know if there's a route way to handle this, but you could do a conditional on the <code>craft.request</code> method <a href="http://buildwithcraft.com/docs/templating/craft.request#getPageNum" rel="nofollow"><code>getPageNum()</code></a> like so:</p>
  
  <pre><code>{% if craft.request.getPageNum == 1 %}
      &lt;!-- Header for the home page --&gt;
  {% else %}
      &lt;!-- Header for pagination pages --&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-14T04:42:24.840Z
Answers.Text: Thanks for the suggestion! Although it feels a little hacky it does get the job done.
Answers.UserDisplayName: cballenar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-14T05:48:29.033Z
Answers.Text: Why do you think it's hacky, because you use one template for both situations? What about using this template for this expression only and only use it to include two separate files?
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-14T05:49:07.217Z
Answers.Text: @cballenar forgot the @ mention
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-14T14:26:40.780Z
Answers.Text: I think it was because what I was trying to do was hacky. I'm currently rethinking the way the homepage is structured. I'm realizing that the homepage may not need "pagination" at all but just a link to the rest of articles. i.e.: example.com/articles/p#
Answers.UserDisplayName: cballenar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-14T14:29:12.180Z
Answers.Text: P.S.: it erased the @ mention... I wonder if it does it automatically when replying to the last person that commented?
Answers.UserDisplayName: cballenar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-13T15:15:15.183Z
Answers.LastActivityDate: 2014-08-13T15:15:15.183Z
Answers.UserDisplayName: carlcs
Body: <p>Puzzle of the day: How does one load paginated entries on a different template?</p>
  
  <p>Let's say in my homepage I'm loading the latest 5 entries and I would like to have pagination links below, however I want these to load on a different template. (in order to have less rings and bells than on the homepage)</p>
  
  <p>I tried to use routes but it doesn't seem to be working, is this because the pagination works from the original template?</p>
  
  <p>Here's what I tried for <strong>example.com</strong> where <strong>example.com/p2</strong> is paginated:</p>
  
  <pre><code>'(?P&lt;page&gt;\d+)'     // page must be the answer, right?       nope...
  'p(?P&lt;number&gt;\d+)'  // let's try combining 'p' and a number  nope...
  'p\d+'              // how about with just the regex?        nope...
  '(?P&lt;page&gt;)'        // also targets homepage so...           nope...
  </code></pre>
  
  <p>I also tried doing it in the CP with no results.</p>
  
Tags: <templating><pagination>
Title: Use different template for paginated entries
ThreadText: # Use different template for paginated entries
  
  (Asked by: username_0 on 2014-08-13)
  
  Puzzle of the day: How does one load paginated entries on a different template?
  
  Let's say in my homepage I'm loading the latest 5 entries and I would like to have pagination links below, however I want these to load on a different template. (in order to have less rings and bells than on the homepage)
  
  I tried to use routes but it doesn't seem to be working, is this because the pagination works from the original template?
  
  Here's what I tried for **example.com** where **example.com/p2** is paginated:
  
  ```
  '(?P<page>\d+)'     // page must be the answer, right?       nope...
  'p(?P<number>\d+)'  // let's try combining 'p' and a number  nope...
  'p\d+'              // how about with just the regex?        nope...
  '(?P<page>)'        // also targets homepage so...           nope...
  
  ```
  
  I also tried doing it in the CP with no results.
  
  **Tags:** templating, pagination
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-08-13. Score: 5 | Accepted answer
  
  I don't know if there's a route way to handle this, but you could do a conditional on the `craft.request` method [`getPageNum()`](http://buildwithcraft.com/docs/templating/craft.request#getPageNum) like so:
  
  ```
  {% if craft.request.getPageNum == 1 %}
      <!-- Header for the home page -->
  {% else %}
      <!-- Header for pagination pages -->
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks for the suggestion! Although it feels a little hacky it does get the job done.  
  > **username_1**: Why do you think it's hacky, because you use one template for both situations? What about using this template for this expression only and only use it to include two separate files?  
  > **username_1**: @username_0 forgot the @ mention  
  > **username_0**: I think it was because what I was trying to do was hacky. I'm currently rethinking the way the homepage is structured. I'm realizing that the homepage may not need "pagination" at all but just a link to the rest of articles. i.e.: example.com/articles/p#  
  > **username_0**: P.S.: it erased the @ mention... I wonder if it does it automatically when replying to the last person that commented?  
  
  ---
  
  