You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To customise the left panel of the detail view we can create custom templates for our entities (such as person_table, place_table, etc)- but in order to include the custom templates we need to override the abstract entity detail template as well. Instead could we select this object_table template by default and use a more specific template when available, such as person_table or something?
The text was updated successfully, but these errors were encountered:
The template_list templatetag returns a list of templatenames, based on
the MRO of the model passed and a suffix. So instead of hardcoding the
`object_table.html` template, we now use this list to look for matching
templates, which makes it easier to overload the template.
Given that all the models inherit at some point from `genericmodel`, the
`object_table.html` template is now being replaced by a
`genericmodel_card_table.html` template.
Using this template_list approach, it is probably possible to drop some
of the templates alltogether and make the template inheritance chain way
less complex.
Closes: #1446
The template_list templatetag returns a list of templatenames, based on
the MRO of the model passed and a suffix. So instead of hardcoding the
`object_table.html` template, we now use this list to look for matching
templates, which makes it easier to overload the template.
Given that all the models inherit at some point from `genericmodel`, the
`object_table.html` template is now being replaced by a
`genericmodel_card_table.html` template.
Using this template_list approach, it is probably possible to drop some
of the templates alltogether and make the template inheritance chain way
less complex.
Closes: #1446
object_table template is included in the abstract entity detail template
<div class="card-body">{% include "generic/partials/object_table.html" %}</div>
To customise the left panel of the detail view we can create custom templates for our entities (such as
person_table
,place_table
, etc)- but in order to include the custom templates we need to override the abstract entity detail template as well. Instead could we select thisobject_table
template by default and use a more specific template when available, such asperson_table
or something?The text was updated successfully, but these errors were encountered: