Entries from all categories in a category group via URL? I'm familiar with the option in the category settings that allows for categories within a category group to each have their own URLs:


I have this setup and it is working fine. However, I'm wondering if there is a URL structure that will allow me to have a category group "home" URL in which entries from all categories within the category group are shown.

I know there are a couple of different ways I could do this by setting up templates for each category group "home" page, but I would prefer a way to do this using a single template that took into account the URL structure.
Create a URL structure like this:

yourwebsite.com/categories/groupName

Then in your template:

{% set group = craft.request.getSegment(2) %}

{% set categories = craft.categories.group(segment) %}

Once you have the categories you can loop over them and fetch entries related to each. It may however, be more beneficial to do this via a plug-in where you can construct a more complex query based on the categories and therefore be more efficient.

{% for category in categories %}

    {% set entries = craft.entries.relatedTo(category) %}

    {% for entry in entries %}
        // template stuff
    {% endfor %}

{% endfor %}