Database Request with entry variable as argument I am new to Craft CMS and although it is quite simple to use I am stuck on this one. I have 3 sections ('books', 'games', 'movies') and want to do the following:

{% for sub_entry in craft.entries('{{ entry.sectionName }}').find() %}


The problem is that it gives me all sub_entries not just the ones within a specific section i.e. entry.sectionName? If I print out {{ entry.sectionName }} on my website it gives me the correct sectionNames but somehow I can not pass it on to the for loop?

How do I solve this?
Kind regards,
Pete
hmm, wat do you mean with sub_entries? As a general pointer I would do it like this: 

{% set books = craft.entries.section('books') %} 


and then loop over the books. 

To get back to your question, I would suggest moving all the different sections into 1 channel with multiple types in it. For example:

Channel: Media

Types: 


Books
Games
Movies


Then you can query them like this: 

{% set books = craft.entries.section('media').type(['books']) %}

{% for entry in books %}
    &lt;h2&gt;{{entry.title}}&lt;/h2&gt;
{% endfor %}


More info on types here