kopia lustrzana https://github.com/wagtail/wagtail
documentation - fix broken docs references
- remove 2.16 reference to setting that no longer existspull/8229/head
rodzic
21202e421e
commit
5f4942f9ad
|
@ -8,7 +8,7 @@ You can also customise this [same behaviour for images](../images/title_generati
|
|||
|
||||
You can customise the resolved value of this title using a JavaScript [event listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) which will listen to the `'wagtail:documents-upload'` event.
|
||||
|
||||
The simplest way to add JavaScript to the editor is via the [`insert_global_admin_js` hook](../../reference/hooks.html#insert-global-admin-js), however any JavaScript that adds the event listener will work.
|
||||
The simplest way to add JavaScript to the editor is via the [`insert_global_admin_js` hook](insert_global_admin_js), however any JavaScript that adds the event listener will work.
|
||||
|
||||
## DOM Event
|
||||
|
||||
|
@ -58,7 +58,7 @@ def get_global_admin_js():
|
|||
|
||||
### Changing generated titles on the page editor only to remove dashes/underscores
|
||||
|
||||
Using the [`insert_editor_js` hook](../../reference/hooks.html#insert-editor-js) instead so that this script will not run on the `Document` upload page, only on page editors.
|
||||
Using the [`insert_editor_js` hook](insert_editor_js) instead so that this script will not run on the `Document` upload page, only on page editors.
|
||||
|
||||
```python
|
||||
# wagtail_hooks.py
|
||||
|
|
|
@ -8,9 +8,9 @@ The content will still be managed within the same form page's admin.
|
|||
This approach uses the additonal contrib module `wagtail.contrib.routable_page`.
|
||||
|
||||
An alternative approach is to redirect to an entirely different page, which does not require the `routable_page` module.
|
||||
See [Custom landing page redirect](../reference/contrib/forms/customisation.html#custom-landing-page-redirect).
|
||||
See [](form_builder_custom_landing_page_redirect).
|
||||
|
||||
Make sure `"wagtail.contrib.routable_page"` is added to `INSTALLED_APPS`, see [Installation](../reference/contrib/routablepage.html#installation) documentation.
|
||||
Make sure `"wagtail.contrib.routable_page"` is added to `INSTALLED_APPS`, see [](routable_page_mixin) documentation.
|
||||
|
||||
```python
|
||||
from django.shortcuts import redirect
|
||||
|
|
|
@ -8,7 +8,7 @@ You can also customise this [same behaviour for documents](../documents/title_ge
|
|||
|
||||
You can customise the resolved value of this title using a JavaScript [event listener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) which will listen to the `'wagtail:images-upload'` event.
|
||||
|
||||
The simplest way to add JavaScript to the editor is via the [`insert_global_admin_js` hook](../../reference/hooks.html#insert-global-admin-js), however any JavaScript that adds the event listener will work.
|
||||
The simplest way to add JavaScript to the editor is via the [`insert_global_admin_js` hook](insert_global_admin_js), however any JavaScript that adds the event listener will work.
|
||||
|
||||
## DOM Event
|
||||
|
||||
|
@ -57,7 +57,7 @@ def get_global_admin_js():
|
|||
|
||||
### Changing generated titles on the page editor only to remove dashes/underscores
|
||||
|
||||
Using the [`insert_editor_js` hook](../../reference/hooks.html#insert-editor-js) instead so that this script will not run on the `Image` upload page, only on page editors.
|
||||
Using the [`insert_editor_js` hook](insert_editor_js) instead so that this script will not run on the `Image` upload page, only on page editors.
|
||||
|
||||
```python
|
||||
# wagtail_hooks.py
|
||||
|
|
|
@ -532,6 +532,8 @@ Next, you need to transform your template to display the results:
|
|||
|
||||
You can also show the results on the landing page.
|
||||
|
||||
(form_builder_custom_landing_page_redirect)=
|
||||
|
||||
## Custom landing page redirect
|
||||
|
||||
You can override the `render_landing_page` method on your `FormPage` to change what is rendered when a form submits.
|
||||
|
|
|
@ -84,6 +84,7 @@ Thank you to [The National Archives](https://www.nationalarchives.gov.uk) for ki
|
|||
* Ensure that programmatic page moves are correctly logged as 'move' and not 'reorder' in some cases (Andy Babic)
|
||||
|
||||
|
||||
(upgrade-considerations)=
|
||||
## Upgrade considerations
|
||||
|
||||
### Removed support for Django 3.0 and 3.1
|
||||
|
@ -128,4 +129,4 @@ The new sidebar largely supports the same customisations as its predecessor, wit
|
|||
- `MenuItem` and its sub-classes no longer supports customizing arbitrary HTML attributes.
|
||||
- `MenuItem` can no longer be sub-classed to customise its HTML output or load additional JavaScript
|
||||
|
||||
For sites relying on those capabilities, we provide a [`WAGTAIL_SLIM_SIDEBAR = False`](../reference/settings/#WAGTAIL_SLIM_SIDEBAR) setting to switch back to the legacy sidebar. The legacy sidebar and this setting will be removed in Wagtail 2.18.
|
||||
For sites relying on those capabilities, we provide a `WAGTAIL_SLIM_SIDEBAR = False` setting to switch back to the legacy sidebar. The legacy sidebar and this setting will be removed in Wagtail 2.18.
|
||||
|
|
Ładowanie…
Reference in New Issue