Skip to content

Add about the taxonomy page #1266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/contenttypes/taxonomies.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ If you would like to display a list of records with the same taxonomy values, fo
</ul>
```

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

```twig
{% if record|taxonomies.chapters is defined %}
Expand All @@ -265,6 +265,19 @@ If you have a taxonomy with the multiple: true setting you cna do something like
{% endfor %}
{% endif %}
```
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:

```
categories:
name: Categories
...
listing_template: category.twig
```
Notice the `listing_template` key added above. Similarly, you can decide the number of records to be shown within this taxonomy page.

```
listing_records: 4
```

Taxonomy Record Listing
-----------------------
Expand Down