mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
ab7b0d81d6
This replaces several US English dialectical uses of _regular_ with British English equivalents, chiefly _ordinary_.
78 lines
4.0 KiB
ReStructuredText
78 lines
4.0 KiB
ReStructuredText
Copying and creating aliases to existing pages
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. _copying-page-label:
|
|
|
|
Copying Pages
|
|
_____________
|
|
|
|
Sometimes you might not need to create a new page from scratch. For example, you could have several pages that are very similar in terms of structure, but differ in content. In that case, you can copy an existing page and only change the required parts.
|
|
|
|
Here is how to copy an existing page:
|
|
|
|
* When you hover over a page in an :doc:`Explorer page <finding_your_way_around/the_explorer_page>`, click on *More* and then *Copy*.
|
|
|
|
.. image:: ../_static/images/screen12.6_1_copy_from_explorer_menu.png
|
|
:alt: Copy action available when hovering over a page in an explorer page
|
|
|
|
|
|
* You are then taken to a form where you can enter the copy's title, slug and choose the parent page (if you want to change it). You then get the option to publish the copied page right away and an option to mark the copy as an alias of the original page (see :ref:`aliasing-page-label` for more information about aliasing pages).
|
|
|
|
|
|
.. image:: ../_static/images/screen12.6_2_copy_input_information.png
|
|
:alt: Copy page form with the options to change the title, slug, parent page, published status and option to create an alias.
|
|
|
|
|
|
* Once you completed this form, press *Copy this page*. The page will then be copied and appear in the Explorer page.
|
|
|
|
|
|
.. image:: ../_static/images/screen12.6_3_copy_success.png
|
|
:alt: Successful copying of a page results in it being available in the Explorer page.
|
|
|
|
|
|
.. _aliasing-page-label:
|
|
|
|
Aliasing pages
|
|
______________
|
|
|
|
When copying a page, you also have the option to mark it as an alias. The content of an aliased page will stay in sync with the original. This is particularly useful when a page is required to be available in multiple places.
|
|
For example, let's say you have a page about Brioche in the Breads section. You then want to also make this page available in the Pastries section. One way to do this is to create a copy of the Brioche page and change the parent page to the Pastries page. However you now need to remember to update this copy each time the original is modified. If a copy is marked as an alias Wagtail will do this for you each time a modification to the original page is published.
|
|
|
|
Here is how to create an alias to an existing page:
|
|
|
|
* The first step is the same as it is for :ref:`copying-page-label`. When you hover over a page in the :doc:`Explorer page <finding_your_way_around/the_explorer_page>`, click on *More* and then *Copy*.
|
|
* When you get to the copy page form, you can then choose another page as the parent page. Click the *Choose another page* button.
|
|
|
|
|
|
.. image:: ../_static/images/screen12.7_1_alias_choose_parent_page_button.png
|
|
:alt: Clicking the choose another page button during the copy page form in order to change the parent of the copied page.
|
|
|
|
|
|
* Select and click on the desired parent page.
|
|
|
|
|
|
.. image:: ../_static/images/screen12.7_2_alias_choose_new_parent_page.png
|
|
:alt: Selecting and clicking the desired parent page.
|
|
|
|
|
|
* Make sure the *Alias* checkbox is ticked.
|
|
* You can then complete the page aliasing by clicking on the *Copy this page* button.
|
|
|
|
|
|
.. image:: ../_static/images/screen12.7_3_alias_confirm_changes.png
|
|
:alt: Clicking on the Copy this page button to confirm aliasing.
|
|
|
|
|
|
* The aliased page will then appear under the new parent in the Explorer.
|
|
|
|
|
|
.. image:: ../_static/images/screen12.7_3_alias_page_new_parent.png
|
|
:alt: The aliased page appearing under the new parent page in the Explorer page.
|
|
|
|
|
|
* When you try to edit the aliased page, you are notified that it is an alias of another page. You will then be offered two options: edit the original page (with changes appearing in both places) or convert the alias page into an ordinary page (i.e. a conventional copy, not updated when the original changes).
|
|
|
|
|
|
.. image:: ../_static/images/screen12.7_4_alias_page_edit_notification.png
|
|
:alt: Editing an alias page notifies it is an alias and offers to either edit the original page or change the alias to an ordinary page.
|