<p>There are two easy ways to avoid copying and pasting or having duplicate entries. </p>

<p>First, you can use <a href="http://buildwithcraft.com/docs/globals" rel="nofollow">Globals</a> to store the shared information.</p>

<p>Alternatively, your second entry/template can just ask for the data from the entry of the first entry.</p>

<pre><code>{% set shared_information = craft.entries.slug('my-first-entry-slug').first() %}

&lt;p&gt;{{shared_information.customFieldWithSharedInformation}}&lt;/p&gt;
</code></pre>

CC BY-SA 3.0
2015-06-15T14:25:50.827Z
That seems less nasty than my hacky suggestion, thanks :) I guess there's no way to make this more transparent within the CMS though...
Phil Gyford
CC BY-SA 3.0
2015-06-15T14:30:48.480Z
You can make use of your field's instructions to let the user know "this content will appear on page x and page y" to make the management a bit easier!
Aaron Berkowitz
CC BY-SA 3.0
2015-06-15T15:31:47.820Z
Although that assumes a field which is only on that one page, rather than shared across every page in the Structure. Maybe I'm asking too much :)
Phil Gyford
CC BY-SA 3.0
2015-06-15T13:49:17.563Z
2015-06-15T13:49:17.563Z
Aaron Berkowitz
<p>Theres a button in the edit entry page that allows you to save the current entry as a new one, just click the arrow next to the save button and you should see the option in the dropdown.</p>

<p><img src="https://i.sstatic.net/0AQKB.jpg" alt="dupe entry button"></p>

<p>This will essentially duplicate the entry :)</p>

CC BY-SA 3.0
2015-06-15T14:24:51.543Z
But presumably that is much the same as creating a new Entry and copying and pasting the content into it? I want the Entry to exist in two places - edit it once and the changes appear on two pages on the site.
Phil Gyford
CC BY-SA 3.0
2015-06-15T14:26:15.293Z
Gotcha, sorry thought you meant a straight duplication, not multiple relations
Alec Ritson
CC BY-SA 3.0
2015-06-15T13:48:46.433Z
2015-06-15T13:48:46.433Z
Alec Ritson
<p>You could add a new entry type "Duplicate" to your section with just an entries field "Use content from entry".</p>

<p>In your template you can now overwrite your <code>entry</code> variable with:</p>

<pre><code>{% set entry = entry.type == 'dupe' ? craft.entries.id(entry.contentFrom.first().id).first() : entry %}
</code></pre>

<p>You could also use the "Duplicate" entry type to link to the same entry / URL twice from your navigation:</p>

<pre><code>{% nav entry in entries %}
    {% if entry.type == 'dupe' %}
        {% set entry = craft.entries.id(entry.contentFrom.first().id).first() %}
    {% endif %}
    &lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;
{% endnav %}
</code></pre>

<p>And in case someone "guesses" the URL, simply redirect them to the original entry:</p>

<pre><code>{% if entry.type == 'dupe' %}
    {% set entry = craft.entries.id(entry.contentFrom.first().id).first() %}
    {% redirect entry.url %}
{% endif %}
</code></pre>

CC BY-SA 3.0
2015-06-18T10:49:25.710Z
While Aaron's solutions would both work, this is a lovely idea Carl, and it works really well. It was simple to get working and is very transparent for, and editable by, the person using the CMS. Thanks.
Phil Gyford
CC BY-SA 3.0
2015-06-18T11:04:53.710Z
No problem, Phil. Be careful with creating very similar pages and use the canonical meta tag to avoid them be rated as duplicate content by search engines! You do want / need different URLs, right? Otherwise you could just link to the same URL twice from your menu (also user editable with an entry type and help of smart Twig code).
carlcs
CC BY-SA 3.0
2015-06-15T21:53:26.220Z
2015-06-18T11:14:12.790Z
2015-06-18T11:14:12.790Z
carlcs
<p>Most of the pages in my Craft site are contained in one big Structure. There are a couple of pages whose content needs to exist in two locations within the structure. I'm not sure how best to do this.</p>

<p>I could probably hack something together with a bespoke route that loads a template which sets variables related to the navigation, then loads the content from the Entry defined in the CMS... but that seems like a horrible hack, and at that point I'd start to think I should just manually copy and paste the content between the two Entries in the CMS.</p>

<p>Any other ideas? Ideally I'd like it to be manageable in the CMS so it's not too hidden away from the client.</p>

<structure>
How to duplicate a page within a Structure?
# How to duplicate a page within a Structure?

(Asked by: username_0 on 2015-06-15)

Most of the pages in my Craft site are contained in one big Structure. There are a couple of pages whose content needs to exist in two locations within the structure. I'm not sure how best to do this.

I could probably hack something together with a bespoke route that loads a template which sets variables related to the navigation, then loads the content from the Entry defined in the CMS... but that seems like a horrible hack, and at that point I'd start to think I should just manually copy and paste the content between the two Entries in the CMS.

Any other ideas? Ideally I'd like it to be manageable in the CMS so it's not too hidden away from the client.

**Tags:** structure


---

## 3 answers

### Answer by username_3 on 2015-06-15. Score: 4 | Accepted answer

You could add a new entry type "Duplicate" to your section with just an entries field "Use content from entry".
In your template you can now overwrite your entry variable with:
{% set entry = entry.type == 'dupe' ? craft.entries.id(entry.contentFrom.first().id).first() : entry %}

You could also use the "Duplicate" entry type to link to the same entry / URL twice from your navigation:
{% nav entry in entries %}
    {% if entry.type == 'dupe' %}
        {% set entry = craft.entries.id(entry.contentFrom.first().id).first() %}
    {% endif %}
    {{ entry.title }}
{% endnav %}

And in case someone "guesses" the URL, simply redirect them to the original entry:
{% if entry.type == 'dupe' %}
    {% set entry = craft.entries.id(entry.contentFrom.first().id).first() %}
    {% redirect entry.url %}
{% endif %}

> **Comments:**
> **username_0**: While Aaron's solutions would both work, this is a lovely idea Carl, and it works really well. It was simple to get working and is very transparent for, and editable by, the person using the CMS. Thanks.  
> **username_3**: No problem, Phil. Be careful with creating very similar pages and use the canonical meta tag to avoid them be rated as duplicate content by search engines! You do want / need different URLs, right? Otherwise you could just link to the same URL twice from your menu (also user editable with an entry type and help of smart Twig code).  

---

### Answer by username_1 on 2015-06-15. Score: 4

There are two easy ways to avoid copying and pasting or having duplicate entries. 
First, you can use Globals to store the shared information.
Alternatively, your second entry/template can just ask for the data from the entry of the first entry.
{% set shared_information = craft.entries.slug('my-first-entry-slug').first() %}

{{shared_information.customFieldWithSharedInformation}}

> **Comments:**
> **username_0**: That seems less nasty than my hacky suggestion, thanks :) I guess there's no way to make this more transparent within the CMS though...  
> **username_1**: You can make use of your field's instructions to let the user know "this content will appear on page x and page y" to make the management a bit easier!  
> **username_0**: Although that assumes a field which is only on that one page, rather than shared across every page in the Structure. Maybe I'm asking too much :)  

---

### Answer by username_2 on 2015-06-15. Score: 2

Theres a button in the edit entry page that allows you to save the current entry as a new one, just click the arrow next to the save button and you should see the option in the dropdown.

![dupe entry button](https://i.sstatic.net/0AQKB.jpg)

This will essentially duplicate the entry :)

> **Comments:**
> **username_0**: But presumably that is much the same as creating a new Entry and copying and pasting the content into it? I want the Entry to exist in two places - edit it once and the changes appear on two pages on the site.  
> **username_2**: Gotcha, sorry thought you meant a straight duplication, not multiple relations  

---

