Blademaster680
Blademaster680

Reputation: 212

How to add a Snippet Description in Wagtail

I have been searching in the wagtail documentation and stack overflow to find the answer to my question to no avail. I am currently creating vehicle models using wagtail snippets but in the documentation they have a screenshot that shows their snippets have descriptions next to their titles.

enter image description here

Does anyone know how to add descriptions to the snippets? I assume it goes in the Meta class in the model however I cant find the value I need to set the description to.

Any advice would be greatly appreciated.

Upvotes: 3

Views: 344

Answers (1)

solarissmoke
solarissmoke

Reputation: 31404

The screenshot in the documentation is old (from 2015), and the admin templates and structure of snippets have changed quite a bit since then. The functionality to display descriptions was removed in this commit in 2015.

So the short answer is that it's not possible to easily replicate this behaviour. If you really wanted to you could override the template that is used to render the list of snippet models, and add the description yourself - e.g. by looking for a particular property on the model_opts (the model meta class) and rendering that.

Upvotes: 2

Related Questions