Skip to content

Commit d5d8da5

Browse files
authored
Merge pull request #1266 from abdellahrk/patch-3
Add about the taxonomy page
2 parents b080665 + f4f16e2 commit d5d8da5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docs/contenttypes/taxonomies.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ If you would like to display a list of records with the same taxonomy values, fo
251251
</ul>
252252
```
253253

254-
If you have a taxonomy with the multiple: true setting you cna do something like this:
254+
If you have a taxonomy with the multiple: true setting you can do something like this:
255255

256256
```twig
257257
{% if record|taxonomies.chapters is defined %}
@@ -265,6 +265,19 @@ If you have a taxonomy with the multiple: true setting you cna do something like
265265
{% endfor %}
266266
{% endif %}
267267
```
268+
In your `taxonomy.yaml` file, where you have defined your different taxonomies, you can decide which file should be used to display your records for a specific taxonomy (categories for example) if you do not want to stick to the default (which is `listing_template: listing.twig` in `config/bolt/config.yaml`). You can define this under your taxonomy like this:
269+
270+
```
271+
categories:
272+
name: Categories
273+
...
274+
listing_template: category.twig
275+
```
276+
Notice the `listing_template` key added above. Similarly, you can decide the number of records to be shown within this taxonomy page.
277+
278+
```
279+
listing_records: 4
280+
```
268281

269282
Taxonomy Record Listing
270283
-----------------------

0 commit comments

Comments
 (0)