Answers.Body: <p>Not sure about the Mijingo tutorial, but pretty sure you need to change this:</p>
  
  <pre><code>{% paginate craft.entries.section('posts').limit(8) as postEntries %}
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>{% paginate craft.entries.section('posts').limit(8) as paginate, postEntries %}
  </code></pre>
  
  <p>If that doesn't work, then there is probably a conflict with your using <code>paginate</code> as a variable inside the <code>{% paginate %}</code> tag.</p>
  
  <p>You should update it to be something else like the example in the <a href="https://craftcms.com/docs/templating/paginate" rel="nofollow">pagination docs</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-23T20:38:36.003Z
Answers.Text: It does not work.
Answers.UserDisplayName: Hellyar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-23T20:52:33.820Z
Answers.Text: But the pagination docs approach works.  Good enough for me.
Answers.UserDisplayName: Hellyar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-10-23T20:31:57.887Z
Answers.LastActivityDate: 2016-10-23T20:31:57.887Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>A couple of years later, I ran into the same issue. In case there are others looking, it looks like this line:</p>
  
  <pre><code>{% for page, url in paginate.getPreviousUrls(5) %}
  </code></pre>
  
  <p>Should be:</p>
  
  <pre><code>{% for page, url in paginate.getPrevUrls(5) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-16T19:03:14.690Z
Answers.LastActivityDate: 2018-07-16T19:42:28.367Z
Answers.LastEditDate: 2018-07-16T19:42:28.367Z
Answers.UserDisplayName: sonoflee
Body: <p>I thought this would be easy.  I cut and pasted code that works from the Mijingo Happy Lager tutorial site. But, I keep getting the template error below.</p>
  
  <p>My code...</p>
  
  <pre><code>{% paginate craft.entries.section('posts').limit(8) as postEntries %}
  
      {% for post in postEntries %}
  
          &lt;div class="element-item {{post.isotope}} box col-md-3 "&gt;
              &lt;div class="post-box vertical clearfix"&gt;
                  &lt;a href="{{ post.url }}" class="image-link arrow-icon dark-overlay"&gt;&lt;img src="{{ post.postImage.first().getUrl('thumbImage')}}" width="434" height="434" alt=""&gt;&lt;/a&gt;
  
                  &lt;div class="extra-info"&gt;                                    
                      &lt;h5&gt;&lt;a href="{{ post.url }}"&gt;{{ post.title}}&lt;/a&gt;&lt;/h5&gt;
  
                      &lt;p class="meta small"&gt;{{ post.postDate | date('F d, Y') }}&lt;/p&gt;
                      &lt;a href="{{post.url}}" class="go-to-arrow"&gt;&lt;i class="fa fa-arrow-circle-o-right fa-2x" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      {% endfor %}
  
      &lt;div class="pagination"&gt;
          &lt;ul&gt;
              {% if paginate.prevUrl %}
                  &lt;li&gt;&lt;a href="{{ paginate.prevUrl }}" class="pag-prev-link"&gt;Previous Page&lt;/a&gt;&lt;/li&gt;
              {% endif %}
  
              {% for page, url in paginate.getPreviousUrls(5) %}
                  &lt;li&gt;&lt;a href="{{ url }}"&gt;{{ page }}&lt;/a&gt;&lt;/li&gt;
              {% endfor %}
  
              &lt;li class="current"&gt;{{ paginate.currentPage }}&lt;/li&gt;
  
              {% for page, url in paginate.getNextUrls(5) %}
                  &lt;li&gt;&lt;a href="{{ url }}"&gt;{{ page }}&lt;/a&gt;&lt;/li&gt;
              {% endfor %}
  
              {% if paginate.nextUrl %}
                  &lt;li&gt;&lt;a href="{{ paginate.nextUrl }}" class="pag-next-link"&gt;Next Page&lt;/a&gt;&lt;/li&gt;
              {% endif %}
          &lt;/ul&gt;
      &lt;/div&gt;
  
  {% endpaginate %}   
  </code></pre>
  
  <p>The error message...</p>
  
  <blockquote>
    <p>Neither the property "getPreviousUrls" nor one of the methods "getPreviousUrls()", "getgetPreviousUrls()"/"isgetPreviousUrls()" or "__call()" exist and have public access in class "Craft\PaginateVariable"</p>
  </blockquote>
  
  <p>What am I forgetting?</p>
  
Tags: <templating><pagination>
Title: How do I get Pagination to Work?
ThreadText: # How do I get Pagination to Work?
  
  (Asked by: username_0 on 2016-10-23)
  
  I thought this would be easy. I cut and pasted code that works from the Mijingo Happy Lager tutorial site. But, I keep getting the template error below.
  
  My code...
  
  ```
  {% paginate craft.entries.section('posts').limit(8) as postEntries %}
  
      {% for post in postEntries %}
  
          <div class="element-item {{post.isotope}} box col-md-3 ">
              <div class="post-box vertical clearfix">
                  <a href="{{ post.url }}" class="image-link arrow-icon dark-overlay"><img src="{{ post.postImage.first().getUrl('thumbImage')}}" width="434" height="434" alt=""></a>
  
                  <div class="extra-info">                                    
                      <h5><a href="{{ post.url }}">{{ post.title}}</a></h5>
  
                      <p class="meta small">{{ post.postDate | date('F d, Y') }}</p>
                      <a href="{{post.url}}" class="go-to-arrow"><i class="fa fa-arrow-circle-o-right fa-2x" aria-hidden="true"></i></a>
  
                  </div>
              </div>
          </div>
      {% endfor %}
  
      <div class="pagination">
          <ul>
              {% if paginate.prevUrl %}
                  <li><a href="{{ paginate.prevUrl }}" class="pag-prev-link">Previous Page</a></li>
              {% endif %}
  
              {% for page, url in paginate.getPreviousUrls(5) %}
                  <li><a href="{{ url }}">{{ page }}</a></li>
              {% endfor %}
  
              <li class="current">{{ paginate.currentPage }}</li>
  
              {% for page, url in paginate.getNextUrls(5) %}
                  <li><a href="{{ url }}">{{ page }}</a></li>
              {% endfor %}
  
              {% if paginate.nextUrl %}
                  <li><a href="{{ paginate.nextUrl }}" class="pag-next-link">Next Page</a></li>
              {% endif %}
          </ul>
      </div>
  
  {% endpaginate %}   
  
  ```
  
  The error message...
  
  > Neither the property "getPreviousUrls" nor one of the methods "getPreviousUrls()", "getgetPreviousUrls()"/"isgetPreviousUrls()" or "\_\_call()" exist and have public access in class "Craft\PaginateVariable"
  
  What am I forgetting?
  
  **Tags:** templating, pagination
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-10-23. Score: 1 | Accepted answer
  
  Not sure about the Mijingo tutorial, but pretty sure you need to change this:
  
  ```
  {% paginate craft.entries.section('posts').limit(8) as postEntries %}
  
  ```
  
  To this:
  
  ```
  {% paginate craft.entries.section('posts').limit(8) as paginate, postEntries %}
  
  ```
  
  If that doesn't work, then there is probably a conflict with your using `paginate` as a variable inside the `{% paginate %}` tag.
  
  You should update it to be something else like the example in the [pagination docs](https://craftcms.com/docs/templating/paginate).
  
  > **Comments:**
  > **username_0**: It does not work.  
  > **username_0**: But the pagination docs approach works.  Good enough for me.  
  
  ---
  
  ### Answer by username_2 on 2018-07-16. Score: 2
  
  A couple of years later, I ran into the same issue. In case there are others looking, it looks like this line:
  
  ```
  {% for page, url in paginate.getPreviousUrls(5) %}
  
  ```
  
  Should be:
  
  ```
  {% for page, url in paginate.getPrevUrls(5) %}
  
  ```
  
  
  ---
  
  