Macros

These are the included pre-built macros for the ISO 27001 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(scope_tag=”all”) %}

Description

Displays a table that tabulates finding count by severity for findings tagged with the passed argument for the scope. If no scope tag is passed, the count will include all findings in the report. If the default of “all” is used, this additional string will precede the table: If a single scope tag is passed (e.g., “internal”), only those findings with that tag will be tabulated.

Arguments

Examples

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

{{p display_findings_count(ss.internal_tag) }} {# tabulates only internal findings #}

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

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.

Example

{{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

Examples

{{p display_detailed_findings() }}

Sample Output

Last updated

© 2024 PlexTrac, Inc. All rights reserved.