Skip to content

Commit 03e6270

Browse files
toaa-odooauva-odoo
authored andcommitted
[IMP] website: "pages" page
Adding a documentation on "pages" within the already existing "page" toctree task-3383323 Co-authored-by: Toaa <[email protected]> Co-authored-by: Auva <[email protected]>
1 parent 10e6f02 commit 03e6270

File tree

5 files changed

+179
-1
lines changed

5 files changed

+179
-1
lines changed

content/applications/websites/website/pages.rst

Lines changed: 179 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,187 @@
1-
:nosearch:
1+
:show-content:
22

33
=====
44
Pages
55
=====
66

7+
Odoo allows you to create pages for your website and customize their content and appearance to your
8+
needs.
9+
10+
Page creation
11+
=============
12+
13+
Website pages can be created from the **frontend** and the **backend**. To create a new website
14+
page, proceed as follows:
15+
16+
#. - Either open the **Website** app, click :guilabel:`+ New` in the top-right corner, then select
17+
:guilabel:`Page`;
18+
- Or go to :menuselection:`Website --> Site --> Pages` and click :guilabel:`New`.
19+
#. Enter a :guilabel:`Page Title`; this title is used in the menu, as well as in the page's URL.
20+
#. Click :guilabel:`Create`.
21+
#. Customize the page's content and appearance using the website builder, then click
22+
:guilabel:`Save`.
23+
#. :ref:`Publish <website/un-publish-page>` the page.
24+
25+
.. note::
26+
Disable :guilabel:`Add to menu` if the page should not appear in the menu.
27+
28+
Page management
29+
===============
30+
31+
.. _website/un-publish-page:
32+
33+
Publishing/unpublishing pages
34+
-----------------------------
35+
36+
Pages need to be published to make them accessible to website visitors. To publish or unpublish a
37+
page, access it, then toggle the switch in the upper-right corner from :guilabel:`Unpublished`
38+
to :guilabel:`Published`, or vice versa.
39+
40+
.. image:: pages/un-published_toggle.png
41+
:alt: Unpublished/Published toggle
42+
43+
.. note::
44+
It is also possible to:
45+
46+
- publish/unpublish a page from the :ref:`page properties <website/page_properties>`, where you
47+
can define a publishing date and/or restrict the page's visibility if needed;
48+
- publish/unpublish several pages at once: Go to :menuselection:`Website --> Site --> Pages`,
49+
select the pages, then, click :guilabel:`Action` and select :guilabel:`Publish` or
50+
:guilabel:`Unpublish`.
51+
52+
Homepage
53+
--------
54+
55+
By default, when you create a website, Odoo creates a dedicated :guilabel:`Home` page, but you can
56+
define any website page as your homepage. To do so, go to :menuselection:`Website --> Configuration
57+
--> Settings`, then, in the :guilabel:`Website info` section, define the URL of the desired page in
58+
the field :guilabel:`Homepage URL` (e.g., `/shop`).
59+
60+
Alternatively, you can define any static page as your homepage by going to :menuselection:`Editor
61+
--> Site --> Properties`. Select the :guilabel:`Publish` tab and enable :guilabel:`Use as Homepage`.
62+
63+
.. _website/page_properties:
64+
65+
Page properties
66+
---------------
67+
68+
To modify a page's properties, access the page you wish to modify, then go to
69+
:menuselection:`Editor --> Site --> Properties`.
70+
71+
The :guilabel:`Name` tab allows you to:
72+
73+
- rename the page using the :guilabel:`Page Name` field;
74+
- modify the :guilabel:`Page URL`. In this case, you can :ref:`redirect the old URL to the new one
75+
<website/URL-redirection>` if needed. To do so, enable :guilabel:`Redirect Old URL`, then select
76+
the :guilabel:`Type` of redirection.
77+
78+
.. image:: pages/page-redirection.png
79+
:alt: Redirect old URL
80+
81+
You can further adapt the page's properties in the :guilabel:`Publish` tab:
82+
83+
- :guilabel:`Show in Top Menu`: Disable if you don't want the page to appear in the menu;
84+
- :guilabel:`Use as Homepage`: Enable if you want the page to be the homepage of your website;
85+
- :guilabel:`Indexed`: Disable if you don't want the page to be indexed, i.e., shown in search
86+
engine results;
87+
- :guilabel:`Published`: Enable to publish the page;
88+
- :guilabel:`Publishing Date`: To publish the page at a specific moment, select the date,
89+
click the clock icon to set the time, then click the green check mark to validate your selection.
90+
- :guilabel:`Visibility`: Select who can access the page:
91+
92+
- :guilabel:`All`
93+
- :guilabel:`Signed In`
94+
- :guilabel:`Restricted Group`: Select the group in the :guilabel:`Authorized group` field.
95+
- :guilabel:`With Password` : Enter the password in the :guilabel:`Password` field.
96+
97+
.. tip::
98+
Alternatively, *some* of these properties can also be modified from :menuselection:`Website -->
99+
Site --> Pages`.
100+
101+
Duplicating pages
102+
~~~~~~~~~~~~~~~~~
103+
104+
To duplicate a page, access the page, then go to :menuselection:`Editor --> Site --> Properties` and
105+
click :guilabel:`Duplicate Page`. Enter a :guilabel:`Page Name`, then click :guilabel:`OK`. By
106+
default, the new page is added after the duplicated page in the menu, but you can remove it from the
107+
menu or change its position using the menu editor.
108+
109+
.. _website/delete-page:
110+
111+
Deleting pages
112+
~~~~~~~~~~~~~~
113+
114+
To delete a page, proceed as follows:
115+
116+
#. Access the page, then go to :menuselection:`Editor --> Site --> Properties` and click
117+
:guilabel:`Delete Page`.
118+
#. A pop-up window appears on the screen with all links referring to the page you want to delete,
119+
organized by category. To ensure website visitors don't land on a 404 error page, you must update
120+
all the links on your website referring to the page. To do so, expand a category, e.g.,
121+
:guilabel:`Page`, then click on a link to open it in a new window.
122+
#. Once you have updated the links (or set up a :ref:`redirection <website/URL-redirection>`),
123+
select the :guilabel:`I am sure about this` check box, then click :guilabel:`OK`.
124+
125+
.. note::
126+
Visitors are redirected to a 404 error page when they try to access a deleted page, either
127+
directly or through a link that hasn't been updated. You can prevent this by defining a
128+
:ref:`redirection <website/URL-redirection>` for the page's URL.
129+
130+
.. _website/URL-redirection:
131+
132+
URL redirects
133+
-------------
134+
135+
Redirecting URLs consists in sending visitors and search engines to a URL that is different from the
136+
one they originally requested. This technique is used, for example, to prevent broken links when you
137+
:ref:`delete a page <website/delete-page>`, :ref:`modify its URL <website/page_properties>`, or move
138+
your site to a new :doc:`domain </administration/maintain/domain_names>`. It can also be used to
139+
improve :doc:`pages/seo`.
140+
141+
To access existing URL redirections for your website and create new ones, :doc:`activate the
142+
developer mode </applications/general/developer_mode>` and go to :menuselection:`Website -->
143+
Configuration --> Redirects`.
144+
145+
.. note::
146+
A record is added automatically everytime you :ref:`modify a page's URL
147+
<website/page_properties>` and enable :guilabel:`Redirect Old URL`.
148+
149+
To create a new redirection, click the :guilabel:`New` button, then fill in the fields:
150+
151+
- :guilabel:`Name`: Enter a name to identify the redirect.
152+
- :guilabel:`Action`: Select the type of redirection:
153+
154+
- :guilabel:`404 Not found`: visitors are redirected to a 404 error page when they try to access
155+
the page.
156+
- :guilabel:`301 Moved Permanently`: for permanent redirections of static pages; the new URL is
157+
shown in search engine results and the redirect is cached by browsers.
158+
- :guilabel:`302 Moved Temporarily`: for short-term redirections, for example, if you are
159+
redesigning or updating the page. The new URL is neither cached by browsers, nor shown in
160+
search engine results.
161+
- :guilabel:`308 Redirect / Rewrite`: for permanent redirections of existing Odoo routes/
162+
controllers. Use this redirect type to rename a controller, for example, if you wish to rename
163+
`/shop` into `/market`.
164+
165+
- :guilabel:`URL from`: Enter the URL to be redirected (e.g., `/about-the-company`) or search for
166+
the desired route/controller and select it from the list.
167+
- :guilabel:`URL to`: For 301, 202 and 308 redirects, enter the URL to be redirected to. If you want
168+
to redirect to an external URL, make sure to include the protocol (e.g., `https://`).
169+
- :guilabel:`Website`: Select a specific website.
170+
- :guilabel:`Sequence`: to define the order in which redirections are performed, e.g. in the case of
171+
redirect chains (i.e., a series of redirects where one URL is redirected to another one, which is
172+
itself further redirected to another URL).
173+
174+
Toggle the :guilabel:`Activate` switch to deactivate the redirection.
175+
176+
.. note::
177+
- 301 and 308 redirections are cached by browsers.
178+
- 404, 301 and 302 redirections only work if the original page has been :ref:`unpublished
179+
<website/un-publish-page>` or :ref:`deleted <website/delete-page>`.
180+
181+
.. seealso::
182+
- `Redirects and Google Search <https://developers.google.com/search/docs/crawling-indexing/301-redirects>`_
183+
- :doc:`pages/seo`
184+
7185
.. toctree::
8186
:titlesonly:
9187

5.91 KB
Loading
9.06 KB
Loading
63 KB
Loading
3.57 KB
Loading

0 commit comments

Comments
 (0)