<p>You're close!</p>

<p><a href="http://buildwithcraft.com/classreference/models/SectionModel">SectionModel</a> has '<a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/models/SectionModel.php#L182">name</a>' and '<a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/models/SectionModel.php#L183">handle</a>' attributes and one of those is probably what you're looking for.</p>

<pre><code>{% if entry.section.handle == 'lettings' %}
    {{ entry.rentFrequency.label }}
{% endif %}
</code></pre>

CC BY-SA 3.0
2014-09-07T20:03:24.920Z
2014-09-07T20:03:24.920Z
Brad Bell
<p>How can I conditionally display content if its a specific section?</p>

<p>Currently I'm trying this with no luck:</p>

<pre><code>{% if entry.section == 'lettings' %}{{ entry.rentFrequency.label }}{% endif %}
</code></pre>

<conditional>
Conditionally Display Content if Section
# Conditionally Display Content if Section

(Asked by: username_0 on 2014-09-07)

How can I conditionally display content if its a specific section?
Currently I'm trying this with no luck:
{% if entry.section == 'lettings' %}{{ entry.rentFrequency.label }}{% endif %}

**Tags:** conditional

---

## 1 answers

### Answer by username_1 on 2014-09-07. Score: 10 | Accepted answer

You're close!
SectionModel has 'name' and 'handle' attributes and one of those is probably what you're looking for.
{% if entry.section.handle == 'lettings' %}
    {{ entry.rentFrequency.label }}
{% endif %}


---

