<p>And just to make sure: you are iterating over the results, right? because it actually should be:</p>

<p><code>{% set entries = craft.entries.section('businessProfile').type(['type1','type2]).all() %}
{% for entry in entries %} ...
... Here {{entry.type}} should be different
{% endfor %}</code></p>

CC BY-SA 3.0
2018-04-04T21:44:42.260Z
Sorry man, it doesn't work. It's like only one entry type can be reached at one time. Because when I change the type and save it, the type will be shown. And when I switch to the other type and save, the result change to that type.
yu xia
CC BY-SA 3.0
2018-04-04T22:26:04.197Z
But you have more entries in your section than one don't you?
Robin Schambach
CC BY-SA 3.0
2018-04-05T03:11:32.967Z
@RobinSchambach Yes, I have two entries under the section.
yu xia
CC BY-SA 3.0
2018-04-05T06:07:48.310Z
@yuxia do you expect to get both types in the `entry.type` function? Because it will only return you the current selected type
Robin Schambach
CC BY-SA 3.0
2018-04-05T22:06:27.157Z
@RobinSchambach Yeah, I wanna get some values from both entry types at the same time. But now it's like impossible
yu xia
CC BY-SA 3.0
2018-04-06T07:29:46.550Z
What do you mean by "get some values?" you can access all available types in your section by `entry.getSection().getEntryTypes()` but this has actually nothing to do with your entry and should not be done in a loop
Robin Schambach
CC BY-SA 3.0
2018-04-04T07:57:02.257Z
2018-04-04T07:57:02.257Z
Matthias Redl-Mann
<p>I have two entry types in a same structure, I want to get some values from these two types in a same page. Is it possible?</p>

<p>I tried:</p>

<pre><code>{% set entry = craft.entries.section('businessProfile').type(['type1','type2]) %}
</code></pre>

<p>And the <code>entry.type</code> still shows only one type. Thanks in advance!</p>

CC BY-SA 3.0
2018-04-04T06:10:19.547Z
You can fetch all entry type when you just leave don't include `.types`. Besides that your command is missing an `'` otherwise it is totally correct.
Robin Schambach
<entry><entry-type>
How can I show multiple entry types in the same page
# How can I show multiple entry types in the same page

(Asked by: username_0 on 2018-04-03)

I have two entry types in a same structure, I want to get some values from these two types in a same page. Is it possible?
I tried:
{% set entry = craft.entries.section('businessProfile').type(['type1','type2]) %}

And the entry.type still shows only one type. Thanks in advance!

**Tags:** entry, entry-type
> **Comments:**
> **username_1**: You can fetch all entry type when you just leave don't include `.types`. Besides that your command is missing an `'` otherwise it is totally correct.  

---

## 1 answers

### Answer by username_2 on 2018-04-04. Score: 1

And just to make sure: you are iterating over the results, right? because it actually should be:

`{% set entries = craft.entries.section('businessProfile').type(['type1','type2]).all() %}
{% for entry in entries %} ...
... Here {{entry.type}} should be different
{% endfor %}`

> **Comments:**
> **username_0**: Sorry man, it doesn't work. It's like only one entry type can be reached at one time. Because when I change the type and save it, the type will be shown. And when I switch to the other type and save, the result change to that type.  
> **username_1**: But you have more entries in your section than one don't you?  
> **username_0**: @RobinSchambach Yes, I have two entries under the section.  
> **username_1**: @yuxia do you expect to get both types in the `entry.type` function? Because it will only return you the current selected type  
> **username_0**: @RobinSchambach Yeah, I wanna get some values from both entry types at the same time. But now it's like impossible  
> **username_1**: What do you mean by "get some values?" you can access all available types in your section by `entry.getSection().getEntryTypes()` but this has actually nothing to do with your entry and should not be done in a loop  

---

