Need a little help with basic understanding of how categories work I am trying to figure out how I can put categories to use, and I need some help.

I have created a category group called "group1", and 2 catogories inside called "cat1" and "cat2". and I have added the catogorie field to some articles in a structure so that I have a few linked to both cat1 and cat2.

My goal simply to make a forloop listing the catogorie title of both cat1 and cat2, and create an UL with the entry.title of the entries in each catogorie.

This is my code:

{% for cat in craft.categories.group('group1') %}
    &lt;p&gt;{{ cat.title }}&lt;/p&gt;
    {% for entry in craft.entries.section('structure').level(3).relatedTo(cat) %}
        &lt;ul&gt;
            &lt;li&gt;{{ entry.title }}&lt;/li&gt;
        &lt;/ul&gt;
    {% endfor %}
{% endfor %}


This gives me the two catogorie titles, but no entry titles. I dont think I understand how to use the related to group part. Would really appreaciate some help figuring this one out.
Your code is only listing entries in the structure that are nested inside 2 parent entries. Try this:

{% for entry in craft.entries.section('structure').relatedTo(cat) %}

Also, your &lt;ul&gt; is inside your for loop, it should be:

&lt;ul&gt;
    {% for entry in craft.entries.section('structure').relatedTo(cat) %}`
    &lt;li&gt;{{ entry.title }}&lt;/li&gt;
    {% endfor%}
&lt;/ul&gt;