Can a variable be conditionally added to the HTML field in a GRC Article Template of Type HTML?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 12:03 AM
Hi,
I'm creating an Article Template in sn_compliance_article_template table. The type is HTML.
In the HTML field, the values are supplied as follows:
${current.name} --- to get the Policy name
${current.description} --- to get the Policy description
${current.policy_text} --- to the the Policy Text, etc.
In the HTML source code, it would be like
<p>${current.name}</p><br/>
<p>${current.description}</p><br/>
<p>${current.policy_text}</p>
Now, what I would like to know is, if there is a way to conditionally check if the field has any value to begin with.
If Description field does not have any value, I do not want an empty line between name and policy text values.
Is it possible to do something with the HTML field, probably through source code, to avoid printing if the field has no value?
I have tried using ng-if, doesn't work. The field doesn't save the code that way.