Answers.Body: <p>Isn't <code>news/test-article</code> just an example of <code>news/{slug}</code>? And is this for a plugin (hence the PHP) or a template (hence the templating tag for your question)?</p>
  
  <p>Perhaps what you want to do is start by grabbing the slug from the URL and getting the entry you're after:</p>
  
  <pre><code>{% set entry = craft.entries.section('news').slug(craft.request.lastSegment).first %}
  // output
  </code></pre>
  
  <p>Use that to display the first entry, then get the rest of the news entries but filter out the active:</p>
  
  <pre><code>{% set otherEntries = craft.entries.section('news').id('not ' ~ entry.id) %}
  {% for otherEntry in otherEntries %}
      // output
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-24T11:38:53.960Z
Answers.LastActivityDate: 2017-04-24T11:38:53.960Z
Answers.UserDisplayName: Clive Portman
Body: <p>I have a news page (/news). You can open an article (i.e. /news/test-article) which uses the same listing template, but has an accordion open with content for that article (javascript/push state magic).</p>
  
  <p>In the event someone goes directly to /news/{slug} I want to make sure that article is the top one in the list.</p>
  
  <p>Is it possible to go i.e. </p>
  
  <pre><code>$criterea = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
  $criterea-&gt;section = 'news';
  $criterea-&gt;order = 'postDate desc';
  $criterea-&gt;ids = [$startArticle-&gt;id, {magically fall back to default sorting!}];
  $criterea-&gt;fixedOrder = true;
  </code></pre>
  
  <p>Or am I going to have to futz with the array manually after the search?</p>
  
  <p>Thanks.</p>
  
Tags: <templating><elementcriteriamodel>
Title: Fixed order with limited set, then resume normal order
ThreadText: # Fixed order with limited set, then resume normal order
  
  (Asked by: username_0 on 2017-03-30)
  
  I have a news page (/news). You can open an article (i.e. /news/test-article) which uses the same listing template, but has an accordion open with content for that article (javascript/push state magic).
  
  In the event someone goes directly to /news/{slug} I want to make sure that article is the top one in the list.
  
  Is it possible to go i.e.
  
  ```
  $criterea = craft()->elements->getCriteria(ElementType::Entry);
  $criterea->section = 'news';
  $criterea->order = 'postDate desc';
  $criterea->ids = [$startArticle->id, {magically fall back to default sorting!}];
  $criterea->fixedOrder = true;
  
  ```
  
  Or am I going to have to futz with the array manually after the search?
  
  Thanks.
  
  **Tags:** templating, elementcriteriamodel
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-04-24. Score: 1
  
  Isn't `news/test-article` just an example of `news/{slug}`? And is this for a plugin (hence the PHP) or a template (hence the templating tag for your question)?
  
  Perhaps what you want to do is start by grabbing the slug from the URL and getting the entry you're after:
  
  ```
  {% set entry = craft.entries.section('news').slug(craft.request.lastSegment).first %}
  // output
  
  ```
  
  Use that to display the first entry, then get the rest of the news entries but filter out the active:
  
  ```
  {% set otherEntries = craft.entries.section('news').id('not ' ~ entry.id) %}
  {% for otherEntry in otherEntries %}
      // output
  {% endfor %}
  
  ```
  
  
  ---
  
  