Answers.Body: <p>The url's are always bound to entries. And with your current code, you're getting all <strong>entries</strong> in the 'contact' section, not the section itself. </p>
  
  <p>But if this is a single, what you want is the url of the entry in the 'contact' section. Try this:</p>
  
  <pre><code>{% set contactPage = craft.entries.section('contact').first() %}
  {{ contactPage.getUrl() }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-25T12:45:41.530Z
Answers.LastActivityDate: 2014-09-25T12:45:41.530Z
Answers.UserDisplayName: André Elvan
Body: <p>Is it possible to output the path to a given section?</p>
  
  <p>I'm using this to define the section model for the contact page (a single):</p>
  
  <pre><code>{% set contactPage = craft.entries.section('contact') %}
  </code></pre>
  
  <p>But then, there doesn't seem to be a way to get the url from this model (according to <a href="http://buildwithcraft.com/docs/templating/sectionmodel" rel="noreferrer">section model page</a> on the Craft website.</p>
  
  <p>It seems this information does exist as on the backend there's a link to the Contact page next to the link to edit the section.</p>
  
  <p>Many thanks.</p>
  
Tags: <url><sections><templating>
Title: Output URL to section
ThreadText: # Output URL to section
  
  (Asked by: username_0 on 2014-09-25)
  
  Is it possible to output the path to a given section?
  
  I'm using this to define the section model for the contact page (a single):
  
  ```
  {% set contactPage = craft.entries.section('contact') %}
  
  ```
  
  But then, there doesn't seem to be a way to get the url from this model (according to [section model page](http://buildwithcraft.com/docs/templating/sectionmodel) on the Craft website.
  
  It seems this information does exist as on the backend there's a link to the Contact page next to the link to edit the section.
  
  Many thanks.
  
  **Tags:** url, sections, templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-09-25. Score: 6 | Accepted answer
  
  The url's are always bound to entries. And with your current code, you're getting all **entries** in the 'contact' section, not the section itself.
  
  But if this is a single, what you want is the url of the entry in the 'contact' section. Try this:
  
  ```
  {% set contactPage = craft.entries.section('contact').first() %}
  {{ contactPage.getUrl() }}
  
  ```
  
  
  ---
  
  