Craft 2 use different template for the same structure I have a site with projects which each has a projects structure with an associated category and a number of images.

The URL is set as projects/{projectCat.first.slug}/{slug}

I want to use the structure first for a set of thumbnails for each project (easy - no problem) and then for a gallery page with full size images. Both pages will have the same set of images.
The URL for the first is .com/projects/category/project-name.

The only way I have been able to do it is to make the links from the thumbnail page using:

&lt;a href="/projects/gallery/{{ category.slug }}/{{ entry.slug }}"&gt;


and then using routing:

/projects/gallery/slug/slug to projects/gallery/_entry


This works but if I have a project in two or more categories with the same name it doesn't take account of the category in the URL and is also a bit messy.

Is there a better way?
I finally managed to answer my own question. I changed my routing to

/projects/slug/slug/gallery to projects/gallery/_entry

So was able to use a proper absolute link with /gallery added to the end

.com/projects/category/project/gallery

In the gallery _entry I used the following code to get the entry

{% set projectSlug = craft.request.getSegment(-2) %}
{% set categorySlug = craft.request.getSegment(-3) %} 
{% set category = craft.categories.slug(categorySlug).first() %}
{% set entry = craft.entries.section('projects').slug(projectSlug).relatedTo(category).first() %}

This then worked fine, even if the same named project was used in two different categories

I would still prefer to do this without routing if anyone has any suggestions please?