Skip to content

Commit 8ecfb26

Browse files
committed
revise search
1 parent 8b231ba commit 8ecfb26

2 files changed

Lines changed: 44 additions & 19 deletions

File tree

docs/mastering-plone/custom_search.md

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,28 @@ myst:
99

1010
(custom-search-label)=
1111

12-
# Custom Search
12+
# Custom search
1313

1414
Volto has a search block that allows you to build custom searches without additional add-ons.
1515

16+
````{card} Backend chapter
17+
18+
Check out `mastering-plone-project` at tag `vocabularies`:
19+
20+
```shell
21+
git checkout vocabularies
22+
```
23+
24+
The code at the end of the chapter:
25+
26+
```shell
27+
git checkout search
28+
```
29+
30+
More info in {doc}`code`
31+
````
32+
33+
1634
## Exercise
1735

1836
Show talks on the talks page with a search block.
@@ -44,32 +62,39 @@ Check the entries by switching to the "Browse" tab.
4462
:animate: fade-in-slide-down
4563
:icon: question
4664
47-
{file}`catalog.xml`
65+
{file}`backend/src/ploneconf/site/profiles/default/catalog.xml`
4866
```xml
4967
50-
<index name="type_of_talk" meta_type="KeywordIndex">
51-
<indexed_attr value="type_of_talk"/>
68+
<index meta_type="KeywordIndex"
69+
name="type_of_talk"
70+
>
71+
<indexed_attr value="type_of_talk" />
5272
</index>
53-
<column value="type_of_talk"/>
73+
<column value="type_of_talk" />
5474
```
5575
56-
{file}`querystring.xml`
76+
{file}`backend/src/ploneconf/site/profiles/default/querystring.xml`
5777
```xml
5878
5979
<records interface="plone.app.querystring.interfaces.IQueryField"
60-
prefix="plone.app.querystring.field.type_of_talk">
61-
<value key="title" i18n:translate="">Type of Talk</value>
62-
<value key="enabled">True</value>
63-
<value key="sortable">False</value>
64-
<value key="operations">
65-
<element>plone.app.querystring.operation.selection.any</element>
66-
<element>plone.app.querystring.operation.selection.all</element>
67-
<element>plone.app.querystring.operation.selection.none</element>
68-
</value>
69-
<value key="group" i18n:translate="">Metadata</value>
70-
<value key="vocabulary">ploneconf.types_of_talk</value>
80+
prefix="plone.app.querystring.field.type_of_talk"
81+
>
82+
<value key="title"
83+
i18n:translate=""
84+
>Type of Talk</value>
85+
<value key="enabled">True</value>
86+
<value key="sortable">False</value>
87+
<value key="operations">
88+
<element>plone.app.querystring.operation.selection.any</element>
89+
<element>plone.app.querystring.operation.selection.all</element>
90+
<element>plone.app.querystring.operation.selection.none</element>
91+
</value>
92+
<value key="group"
93+
i18n:translate=""
94+
>Metadata</value>
95+
<value key="vocabulary">ploneconf.types_of_talk</value>
7196
</records>
7297
```
7398
74-
Checkout `ploneconf.site` at tag "search" to see the updated code.
99+
Check out `mastering-plone-project` at tag `search` to see the updated code.
75100
````

docs/mastering-plone/registry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Topics covered:
2828

2929
````{card} Backend chapter
3030
31-
Check out `mastering-plone-project` at tag "events":
31+
Check out `mastering-plone-project` at tag `events`:
3232
3333
```shell
3434
git checkout events

0 commit comments

Comments
 (0)