Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible docx template example [Do not merge] #117

Closed
wants to merge 1 commit into from
Closed

Conversation

geramirez
Copy link
Member

Currently the template engine only supports one way of getting control data.
For example the tag below produces

{{ getControl "NIST-800-53@CM-2"}}

this:

Amazon Elastic Compute Cloud  
Justification in narrative form  
Covered By:  
- EC2 Verification 1 http://VerificationURL.com  

We could implement more complex functions in templates using code similar to the code in this branch to customize the way data is rendered.
For example:

{{ with getJustifications “NIST-800-53@CM-2” }}
{{ range $justification := . }}
{{$justification}}
{{$justification.SatisfiesData.Narrative}}
{{len $justification.SatisfiesData.CoveredBy }}
{{range $coveredBy := $justification.SatisfiesData.CoveredBy}}
{{$coveredBy}}
{{end}}
{{end}}
{{end}}

@afeld
Copy link
Member

afeld commented Jun 9, 2016

@jcscottiii Should we keep this PR open, or has it been subsumed by other changes?

@jcscottiii jcscottiii closed this Jun 10, 2016
@jcscottiii jcscottiii deleted the renderer branch June 10, 2016 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants