Sphinx-Needs¶
Add content before/after need¶
I need to add specific data/content after some needs automatically. For instance to show some list and charts related to the need. How can I add this kind of content without touching the needs itself? |
Flowchart
Use template, pre_template or post_template to define the location of a template-file, which contains extra data/content. This templates are based on jinja and have access to the current need data (title, id, status, content, …). Example of a template stored as file **{{title}}** ({{id}})
The above code will add a simple line with title and id of the need. To set it in front of a need use .. spec:: my need
:pre_template: extra_title
To set a template automatically, use global_options needs_global_options = {
'pre_template': [
('extra_title', 'type=="spec"')
],
|