<p>I think your answer is in the post you referenced. Create two entry types in a single section, each of which contains different fields (and/or some in common). Then loop through all the entries and test for entry type in the output.</p>

<pre><code>{% set entries = craft.entries.section('blog').find() %}

{% for entry in entries %}
    {% if entry.type ==  'linklist' %}
        &lt;h1&gt;&lt;a href="{{ entry.externalLink }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h1&gt;
    {% else %}
        &lt;h1&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h1&gt;
    {% endif %}

    {{entry.body }

{% endfor %}
</code></pre>

<p>The user will have to understand how to change the entry type in Craft's UI (it's the dropdown in the right column, but it's pretty clear once they've been shown how to do it once).</p>

CC BY-SA 3.0
2015-01-22T01:05:28.903Z
BTW, I love Hyperakt's work!
James Muspratt
CC BY-SA 3.0
2015-01-22T01:13:45.713Z
I hadn't even seen the entry types! Of course that makes sense, craft makes it too easy. Thanks for the help there, James! And if you're ever in town, stop by Hyperakt!
Nick
CC BY-SA 3.0
2015-01-22T01:18:33.157Z
Thanks! And FYI if you have a bunch of entry types it's a little nicer to use [switch](http://buildwithcraft.com/docs/templating/switch)
James Muspratt
CC BY-SA 3.0
2015-01-22T01:03:07.687Z
2015-01-22T01:18:09.000Z
2015-01-22T01:18:09.000Z
James Muspratt
<p>My question is closely related to this question: <a href="https://craftcms.stackexchange.com/questions/2340/how-do-i-display-entries-from-multiple-entry-types">How do I display entries from multiple entry types?</a></p>

<p>I would like to have two blog post types:</p>

<ul>
<li>Regular blog posts (Title, Body, etc)</li>
<li>External links posts (Link out to another site)</li>
</ul>

<p>I imagined I would display them in the same area, by dates created, like a standard blog, but clicking some of the links would go to external link.</p>

<p>I want to make this as easy as possible for my client, so I would like them to be in the same place if possible, but also open to any other solutions. Has anyone done something like this?</p>

<p>I thought about the possibility of two channels, and combining all posts and ordering by date? Not completely sure how I would go about that though.</p>

<entries><matrix><channels>
Is it possible to use a lightswitch (or something similar) for different post types?
# Is it possible to use a lightswitch (or something similar) for different post types?

(Asked by: username_0 on 2015-01-22)

My question is closely related to this question: [How do I display entries from multiple entry types?](https://craftcms.stackexchange.com/questions/2340/how-do-i-display-entries-from-multiple-entry-types)

I would like to have two blog post types:

* Regular blog posts (Title, Body, etc)
* External links posts (Link out to another site)

I imagined I would display them in the same area, by dates created, like a standard blog, but clicking some of the links would go to external link.

I want to make this as easy as possible for my client, so I would like them to be in the same place if possible, but also open to any other solutions. Has anyone done something like this?

I thought about the possibility of two channels, and combining all posts and ordering by date? Not completely sure how I would go about that though.

**Tags:** entries, matrix, channels


---

## 1 answers

### Answer by username_1 on 2015-01-22. Score: 2 | Accepted answer

I think your answer is in the post you referenced. Create two entry types in a single section, each of which contains different fields (and/or some in common). Then loop through all the entries and test for entry type in the output.
{% set entries = craft.entries.section('blog').find() %}

{% for entry in entries %}
    {% if entry.type ==  'linklist' %}
        {{ entry.title }}
    {% else %}
        {{ entry.title }}
    {% endif %}

    {{entry.body }

{% endfor %}

The user will have to understand how to change the entry type in Craft's UI (it's the dropdown in the right column, but it's pretty clear once they've been shown how to do it once).

> **Comments:**
> **username_1**: BTW, I love Hyperakt's work!  
> **username_0**: I hadn't even seen the entry types! Of course that makes sense, craft makes it too easy. Thanks for the help there, James! And if you're ever in town, stop by Hyperakt!  
> **username_1**: Thanks! And FYI if you have a bunch of entry types it's a little nicer to use [switch](http://buildwithcraft.com/docs/templating/switch)  

---

