Macros

These are the included pre-built macros for the single-scope report export template. Click each expandable section for more information.

display_narrative

Definition

{%p macro display_narrative(label,label_as_heading=true,heading_level = “h2”,error = true) %}

Description

Renders the title and rich-text contents of a Narrative Section field. Iterates through all Narrative Sections until a match is found for the label argument. The label (Title) will be displayed as a heading level unless false is passed as argument two. The default heading level is two unless a different value is passed as argument three. If the label passed is not found, an error message will be rendered in its place unless argument four is set to false.

Arguments

Examples

{{p display_narrative(“Methodology”) }}

{{p display_narrative(“Methodology”,false) }}

{{p display_narrative(“Methodology”,true,”h3”) }}

{{p display_narrative(“Methodology”,true,”h3”,false) }}

Sample Output

display_findings_count

Definition

{%p macro display_findings_count() %}

Description

Displays a table that tabulates finding count by severity for all Findings in the report.

Arguments

None

Examples

{{p display_findings_count() }} {# tabulates all findings by severity #}

Sample Output

To modify the static text displayed before the table is rendered, search for the function call definition in the Set-Up code and adjust as desired:

display_findings_summary()

Definition

{%p macro display_findings_summary() %}

Description

Description: Renders a Findings Summary Table using the style option set for the variable nn.summary_table_option. There is simple static text preceding each scope in the Jinja Template that can be modified as desired. No arguments are available for this function.

To modify the static text, search for the function name display_findings_summary in the Set-Up code section of the Jinja template. Modify the static text as desired.

Examples

{{p display_findings_summary() }}

Sample Output

display_detailed_findings

Definition

{%p macro display_detailed_findings() %}

Description

Displays the Detailed Findings for Findings in the Report using the Display Option set for nn.detailed_findings_option

Arguments

None

Example

{{p display_detailed_findings() }}

Sample Output

Last updated

© 2024 PlexTrac, Inc. All rights reserved.