Q:

Override template tag in wagtail cms?

I am using ModelAdmin to register a custom model with the Wagtail admin. I would like to customise the IndexView. The only thing I want to do is add a button to each row. I can see that the rows are added by the template tag - results_list, which leads me to the results_list.html in modeladmin/includes.
As this is registered with the @register.inclusion_tag decorator, is it possible to override the template in my own app? The normal django methods of overriding templates dont seem to be working for me...

A:

You can customise the buttons for the index page by setting a custom button_helper_class on your ModelAdmin class: http://docs.wagtail.io/en/v1.8.1/reference/contrib/modeladmin/primer.html#modeladmin-button-helper-class
(Incidentally, the tag and template are named result_list, not results_list - perhaps that's why you weren't able to override it?)

