<p>There are a lot of ways to go about this depending on how you have your sections and templates set up, and where you are getting your content from for both 'dinnermenu' and 'nextweek'.</p>

<p><strong>Using routes</strong></p>

<p>If you just want 'dinnermenu/nextweek' requests to be directed to the 'dinnermenu' template, then one option would be to set up a <a href="http://buildwithcraft.com/docs/routing#dynamic-routes" rel="nofollow">dynamic route</a> with a '*' token as the last segment (i.e. <code>dinnermenu/*</code>). This would route <code>example.com/dinnermenu/any-uri-segment</code> to your 'dinnermenu' template ('dinnermenu.html' or 'dinnermenu/index.html' or whatever you called it).</p>

<p>In the dinnermenu template you can then test for the uri segment and display custom 'nextweek' content, in addition to (or instead of) your dinner menu content.</p>

<pre><code>{% if craft.request.segments(2) == 'nextweek' %}
    // display content for next week
{% endif %}
</code></pre>

<p>See <a href="http://buildwithcraft.com/docs/templating/craft.request" rel="nofollow">craft.request</a> for more info.</p>

<p><strong>Using a structure</strong></p>

<p>For more dynamic nav you could also use a 'structure' (with 2 levels). In the template you can then test for the level and include the parent content as needed.</p>

<pre><code>{% switch entry.level %}
    {% case "1" %}
        {% set dinnermenu = entry %}
    {% case "2" %}
        {% set dinnermenu = entry.parent %}
{% endswitch %}

{{ entry.intro }}     // dinnermenu's or nextweek's 'intro' field
{{ dinnermenu.body }} // with dinnermenu's body field
</code></pre>

<p><strong>Using ElementCriteriaModel</strong></p>

<p>If on the other hand, you want to pull your 'dinnermenu' entry into your 'nextweek' template (no matter where it is), then you can use an <code>EntryCriteriaModel</code> to retrieve and display the 'dinnermenu' entry.</p>

<pre><code>{% set dinnermenu = craft.entries.slug('dinnermenu').first %}
{{ dinnermenu.body }}
etc.
</code></pre>

<p>You could also just include the whole 'dinnermenu' template in the 'nextweek' template.</p>

<pre><code>{% set entry = craft.entries.slug('dinnermenu').first %}
{% include 'dinnermenu.html' %}
</code></pre>

<p>Lot of options.</p>

CC BY-SA 3.0
2014-11-23T01:46:14.157Z
I tried the route method - but then it can't access my data in the entry tag somehow
maxx
CC BY-SA 3.0
2014-11-23T02:38:14.533Z
Just set it manually. `{% set entry = craft.entries.section('mysection').slug('dinnermenu').first %}`
Douglas McDonald
CC BY-SA 3.0
2014-11-23T16:29:59.557Z
perfect :) that was what I needed
maxx
CC BY-SA 3.0
2014-11-23T16:45:56.957Z
Great! maybe mark this as correct then
Douglas McDonald
CC BY-SA 3.0
2014-11-22T15:53:53.283Z
2014-11-22T17:04:02.300Z
2014-11-22T17:04:02.300Z
Douglas McDonald
<p>So I have my dinnermenu at <code>example.com/dinnermenu</code> but I want to show specific content for the next week if someone asks for it via <code>example.com/dinnermenu/nextWeek</code> but it should still use the entry data from dinnermenu ...</p>

<p>how can I achieve that ?</p>

<entries><sections><routing>
How to load a template based on the first segment (and ignoring the second)
# How to load a template based on the first segment (and ignoring the second)

(Asked by: username_0 on 2014-11-22)

So I have my dinnermenu at `example.com/dinnermenu` but I want to show specific content for the next week if someone asks for it via `example.com/dinnermenu/nextWeek` but it should still use the entry data from dinnermenu ...

how can I achieve that ?

**Tags:** entries, sections, routing


---

## 1 answers

### Answer by username_1 on 2014-11-22. Score: 2 | Accepted answer

There are a lot of ways to go about this depending on how you have your sections and templates set up, and where you are getting your content from for both 'dinnermenu' and 'nextweek'.
Using routes
If you just want 'dinnermenu/nextweek' requests to be directed to the 'dinnermenu' template, then one option would be to set up a dynamic route with a '*' token as the last segment (i.e. dinnermenu/*). This would route example.com/dinnermenu/any-uri-segment to your 'dinnermenu' template ('dinnermenu.html' or 'dinnermenu/index.html' or whatever you called it).
In the dinnermenu template you can then test for the uri segment and display custom 'nextweek' content, in addition to (or instead of) your dinner menu content.
{% if craft.request.segments(2) == 'nextweek' %}
    // display content for next week
{% endif %}

See craft.request for more info.
Using a structure
For more dynamic nav you could also use a 'structure' (with 2 levels). In the template you can then test for the level and include the parent content as needed.
{% switch entry.level %}
    {% case "1" %}
        {% set dinnermenu = entry %}
    {% case "2" %}
        {% set dinnermenu = entry.parent %}
{% endswitch %}

{{ entry.intro }}     // dinnermenu's or nextweek's 'intro' field
{{ dinnermenu.body }} // with dinnermenu's body field

Using ElementCriteriaModel
If on the other hand, you want to pull your 'dinnermenu' entry into your 'nextweek' template (no matter where it is), then you can use an EntryCriteriaModel to retrieve and display the 'dinnermenu' entry.
{% set dinnermenu = craft.entries.slug('dinnermenu').first %}
{{ dinnermenu.body }}
etc.

You could also just include the whole 'dinnermenu' template in the 'nextweek' template.
{% set entry = craft.entries.slug('dinnermenu').first %}
{% include 'dinnermenu.html' %}

Lot of options.

> **Comments:**
> **username_0**: I tried the route method - but then it can't access my data in the entry tag somehow  
> **username_1**: Just set it manually. `{% set entry = craft.entries.section('mysection').slug('dinnermenu').first %}`  
> **username_0**: perfect :) that was what I needed  
> **username_1**: Great! maybe mark this as correct then  

---

