invenio-records-ui
August 23, 2023 ยท View on GitHub
Configuration
RECORDS_UI_ENDPOINTS = dict(
recid=dict(
pid_type='recid',
route='/records/<pid_value>',
template='invenio_records_ui/detail.html'
)
Example: Title of the Detailed Page
Replace the recid as title to the real title of the document.
1. create a new template for the detailed view
touch my_instance/templates/my_instance/detail.html
Note: do not forget to run the static file collect: my_instance collect -v
2. set the RECORDS_UI_ENDPOINTS.template to the new file
RECORDS_UI_ENDPOINTS = dict(
recid=dict(
pid_type='recid',
route='/records/<pid_value>',
template='my_instance/detail.html'
)
3. set the content of the file
<!-- inheritance -->
{% extends 'invenio_records_ui/detail.html' %}
<!-- display title instead of recid -->
{%- block record_title %}
<h2>
{{ record.title }}
</h2>
{%- endblock %}