kopia lustrzana https://github.com/wagtail/wagtail
consistent editors / editor's / Editor's
rodzic
51c6f251e2
commit
494a26b731
|
@ -2,10 +2,10 @@
|
|||
.. _editors-picks:
|
||||
|
||||
|
||||
Editors picks
|
||||
=============
|
||||
Editor's picks
|
||||
==============
|
||||
|
||||
Editor's Picks are a way of explicitly linking relevant content to search terms, so results pages can contain curated content instead of being at the mercy of the search algorithm. In a template using the search results view, editor's picks can be accessed through the variable ``query.editors_picks``. To include editor's picks in your search results template, use the following properties.
|
||||
Editor's picks are a way of explicitly linking relevant content to search terms, so results pages can contain curated content in addition to results from the search algorithm. In a template using the search results view, editor's picks can be accessed through the variable ``query.editors_picks``. To include editor's picks in your search results template, use the following properties.
|
||||
|
||||
``query.editors_picks.all``
|
||||
This gathers all of the editor's picks objects relating to the current query, in order according to their sort order in the Wagtail admin. You can then iterate through them using a ``{% for ... %}`` loop. Each editor's pick object provides these properties:
|
||||
|
@ -16,7 +16,7 @@ Editor's Picks are a way of explicitly linking relevant content to search terms,
|
|||
``editors_pick.description``
|
||||
The description entered when choosing the pick, perhaps explaining why the page is relevant to the search terms.
|
||||
|
||||
Putting this all together, a block of your search results template displaying editor's Picks might look like this:
|
||||
Putting this all together, a block of your search results template displaying editor's picks might look like this:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
|
@ -38,4 +38,4 @@ Putting this all together, a block of your search results template displaying ed
|
|||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
|
Ładowanie…
Reference in New Issue