Answers.Body: <p><strong>UPDATED/EDIT ANSWER:</strong></p>
  
  <p>If you only want to show the entries on the first page you should make an if statement to check if you are on the first page for your Featured Items by requesting the page number.</p>
  
  <p><strong>Option 1:</strong></p>
  
  <pre><code>{% if craft.request.getPageNum() == 1 %} 
  
  // Featured content here
  
  {% endif %}
  </code></pre>
  
  <p><strong>Option 2:</strong></p>
  
  <pre><code>{% if craft.request.getLastSegment() == 'p1' %} 
  
  // Featured content here
  
  {% endif %}
  </code></pre>
  
  <p>The first option is the best / cleanest solution even though they give the same outcome. Option 2 is a nice work around but might be more usefull in other ways then this one. </p>
  
  <p>More about craft requests can be found in the docs:
  <a href="https://craftcms.com/docs/templating/craft.request" rel="nofollow noreferrer">https://craftcms.com/docs/templating/craft.request</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T16:15:51.287Z
Answers.Text: It's not that I'm trying to remove Featured news out of the pagination. I need to remove the featured news items out of the template if the page isn't the first. So when the user goes to page 2 the Featured news items aren't at the top.
Answers.UserDisplayName: sarah3585
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T16:19:45.697Z
Answers.Text: Then I should make an if statement that that gets the page by your "last segment" Ill update the answer
Answers.UserDisplayName: Justin Dekkers
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T17:11:33.417Z
Answers.Text: Thanks, I ended up using {% if craft.request.getPageNum() == 1 %} which you put me on the right path for. Update your answer and I'll mark it correct as you got me 99% there.
Answers.UserDisplayName: sarah3585
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-15T15:41:19.503Z
Answers.LastActivityDate: 2017-03-16T15:58:16.520Z
Answers.LastEditDate: 2017-03-16T15:58:16.520Z
Answers.UserDisplayName: Justin Dekkers
Body: <p>I have some Featured news entries which appear at the top of the rest of the news entries.</p>
  
  <p>How do I set this so they are only on page 1 (before any pagination pages)?</p>
  
  <pre><code>{# Only show on page 1 of pagination #}
  
     {% for entry in craft.entries.section('newsEvents').highlightNews('1').limit(2) %}
  
     &lt;div class="col-12 {% if loop.index is divisibleby(2) %}last{% endif %} panel "&gt;
  
       {% if entry.listingImage|length %}
      {% for image in entry.listingImage %}
        &lt;div class="panel__img"&gt;
          &lt;a href="{{ entry.url }}"&gt;&lt;img src="{{ image.getUrl('listingMedium')}}" alt="{{ image.title }}" /&gt;&lt;/a&gt;
        &lt;/div&gt;
  
      {% endfor %}
  
      {% endif %}
  
    &lt;/div&gt;
  
  {# End only show on page 1 of pagination #}
  
  
  
  {% paginate craft.entries.section('newsEvents').limit(12) as entriesOnPage %}
  
    {% for entry in entriesOnPage %}
  
      ...
  
    {% endfor %} 
  
  
  {% if paginate.totalPages &gt; 1 %}
  
  {% set pagination = true %}
  
    &lt;ul class="pagination"&gt;
      {% if paginate.prevUrl %}&lt;li&gt;&lt;a href="{{ paginate.prevUrl }}"&gt;&amp;#171;&lt;/a&gt;&lt;/li&gt;{% endif %}
  
      {% for page, url in paginate.getPrevUrls(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 }}"&gt;&amp;#187;&lt;/a&gt;&lt;/li&gt;{% endif %}
  
   &lt;/ul&gt;
  
  {% endif %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-15T15:41:52.440Z
Comments.Text: Could you provide the method on how you tell if some entries are featured
Comments.UserDisplayName: Justin Dekkers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-15T16:14:35.030Z
Comments.Text: Updated code. I'm using a lightswitch.
Comments.UserDisplayName: sarah3585
Tags: <pagination>
Title: Check which pagination page to display code outside of pagination loop
ThreadText: # Check which pagination page to display code outside of pagination loop
  
  (Asked by: username_0 on 2017-03-15)
  
  I have some Featured news entries which appear at the top of the rest of the news entries.
  
  How do I set this so they are only on page 1 (before any pagination pages)?
  
  ```
  {# Only show on page 1 of pagination #}
  
     {% for entry in craft.entries.section('newsEvents').highlightNews('1').limit(2) %}
  
     <div class="col-12 {% if loop.index is divisibleby(2) %}last{% endif %} panel ">
  
       {% if entry.listingImage|length %}
      {% for image in entry.listingImage %}
        <div class="panel__img">
          <a href="{{ entry.url }}"><img src="{{ image.getUrl('listingMedium')}}" alt="{{ image.title }}" /></a>
        </div>
  
      {% endfor %}
  
      {% endif %}
  
    </div>
  
  {# End only show on page 1 of pagination #}
  
  {% paginate craft.entries.section('newsEvents').limit(12) as entriesOnPage %}
  
    {% for entry in entriesOnPage %}
  
      ...
  
    {% endfor %} 
  
  {% if paginate.totalPages > 1 %}
  
  {% set pagination = true %}
  
    <ul class="pagination">
      {% if paginate.prevUrl %}<li><a href="{{ paginate.prevUrl }}">&#171;</a></li>{% endif %}
  
      {% for page, url in paginate.getPrevUrls(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 }}">&#187;</a></li>{% endif %}
  
   </ul>
  
  {% endif %}
  
  ```
  
  **Tags:** pagination
  
  > **Comments:**
  > **username_1**: Could you provide the method on how you tell if some entries are featured  
  > **username_0**: Updated code. I'm using a lightswitch.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-15. Score: 3 | Accepted answer
  
  **UPDATED/EDIT ANSWER:**
  
  If you only want to show the entries on the first page you should make an if statement to check if you are on the first page for your Featured Items by requesting the page number.
  
  **Option 1:**
  
  ```
  {% if craft.request.getPageNum() == 1 %} 
  
  // Featured content here
  
  {% endif %}
  
  ```
  
  **Option 2:**
  
  ```
  {% if craft.request.getLastSegment() == 'p1' %} 
  
  // Featured content here
  
  {% endif %}
  
  ```
  
  The first option is the best / cleanest solution even though they give the same outcome. Option 2 is a nice work around but might be more usefull in other ways then this one.
  
  More about craft requests can be found in the docs:
  <https://craftcms.com/docs/templating/craft.request>
  
  > **Comments:**
  > **username_0**: It's not that I'm trying to remove Featured news out of the pagination. I need to remove the featured news items out of the template if the page isn't the first. So when the user goes to page 2 the Featured news items aren't at the top.  
  > **username_1**: Then I should make an if statement that that gets the page by your "last segment" Ill update the answer  
  > **username_0**: Thanks, I ended up using {% if craft.request.getPageNum() == 1 %} which you put me on the right path for. Update your answer and I'll mark it correct as you got me 99% there.  
  
  ---
  
  