kopia lustrzana https://github.com/wagtail/wagtail
Moved page field reference to page model reference
rodzic
2940ea9c9b
commit
605fdc62f7
|
@ -60,29 +60,6 @@ Below that the ``content_panels`` and ``promote_panels`` lists define the capabi
|
|||
Your models may be even more complex, with methods overriding the built-in functionality of the ``Page`` to achieve webdev magic. Or, you can keep your models simple and let Wagtail's built-in functionality do the work.
|
||||
|
||||
|
||||
``Page`` Class Reference
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Default fields
|
||||
--------------
|
||||
|
||||
Wagtail provides some fields for the ``Page`` class by default, which will be common to all your pages. You don't need to add these fields to your own page models however you do need to allocate them to ``content_panels``, ``promote_panels`` or ``settings_panels``. See above example and for further information on the panels see :ref:`editing-api`.
|
||||
|
||||
``title`` (string, required)
|
||||
Human-readable title of the page - what you'd probably use as your ``<h1>`` tag.
|
||||
|
||||
``slug`` (string, required)
|
||||
Machine-readable URL component for this page. The name of the page as it will appear in URLs e.g ``http://domain.com/blog/[my-slug]/``
|
||||
|
||||
``seo_title`` (string)
|
||||
Alternate SEO-crafted title, mainly for use in the page ``<title>`` tag.
|
||||
|
||||
``search_description`` (string)
|
||||
SEO-crafted description of the content, used for internal search indexing, suitable for your page's ``<meta name="description">`` tag.
|
||||
|
||||
``show_in_menus`` (boolean)
|
||||
Toggles whether the page should be considered for inclusion in any site-wide menus you create.
|
||||
|
||||
Tips
|
||||
~~~~
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ Page model Reference
|
|||
.. automodule:: wagtail.wagtailcore.models
|
||||
|
||||
|
||||
``Page`` Class Reference
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Fields
|
||||
------
|
||||
|
||||
|
@ -11,11 +14,13 @@ Fields
|
|||
|
||||
``title`` (text)
|
||||
|
||||
The title of the page (set in the admin).
|
||||
Human-readable title of the page.
|
||||
|
||||
``slug`` (text)
|
||||
|
||||
The slug of the page (set in the admin). This is used for constructing the page's URL.
|
||||
The slug of the page. This is used for constructing the page's URL.
|
||||
|
||||
For example: ``http://domain.com/blog/[my-slug]/``
|
||||
|
||||
``content_type`` (foreign key)
|
||||
|
||||
|
@ -39,9 +44,19 @@ Fields
|
|||
|
||||
The date/time when the page was first published.
|
||||
|
||||
.. ``seo_title`` (text)
|
||||
.. ``show_in_menus`` (boolean)
|
||||
.. ``search_description`` (text)
|
||||
``seo_title`` (text)
|
||||
|
||||
Alternate SEO-crafted title, for use in the page's ``<title>`` HTML tag.
|
||||
|
||||
``search_description`` (text)
|
||||
|
||||
SEO-crafted description of the content, used for search indexing. This is also suitable for the page's ``<meta name="description">`` HTML tag.
|
||||
|
||||
``show_in_menus`` (boolean)
|
||||
|
||||
Toggles whether the page should be included in site-wide menus.
|
||||
|
||||
This is used by the :meth:`~wagtail.wagtailcore.query.PageQuerySet.in_menu` QuerySet filter.
|
||||
|
||||
|
||||
Other methods, attributes and properties
|
||||
|
|
Ładowanie…
Reference in New Issue