Answers.Body: <p>Something like this should work:</p>
  
  <pre><code>{% set sections = [] %}
  
  {% set sections = sections|merge([craft.sections.getSectionById(1)])
  {% set sections = sections|merge([craft.sections.getSectionById(2)])
  {% set sections = sections|merge([craft.sections.getSectionById(3)])
  
  {% for section in sections %}
      ...
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-12T19:04:16.183Z
Answers.LastActivityDate: 2015-11-12T19:04:16.183Z
Answers.UserDisplayName: Brad Bell
Body: <p>I would like to selectively show a subset of my sections in the main navigation. Is it possible to do something like this?</p>
  
  <pre><code>{% set sections = craft.sections.getSectionById(1,2,3) %}
  
  {% for section in sections}
  ...
  </code></pre>
  
Tags: <templating><sections>
Title: Show a partial list of sections
ThreadText: # Show a partial list of sections
  
  (Asked by: username_0 on 2015-11-12)
  
  I would like to selectively show a subset of my sections in the main navigation. Is it possible to do something like this?
  
  ```
  {% set sections = craft.sections.getSectionById(1,2,3) %}
  
  {% for section in sections}
  ...
  
  ```
  
  **Tags:** templating, sections
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-12. Score: 1 | Accepted answer
  
  Something like this should work:
  
  ```
  {% set sections = [] %}
  
  {% set sections = sections|merge([craft.sections.getSectionById(1)])
  {% set sections = sections|merge([craft.sections.getSectionById(2)])
  {% set sections = sections|merge([craft.sections.getSectionById(3)])
  
  {% for section in sections %}
      ...
  {% endfor %}
  
  ```
  
  
  ---
  
  