0 votes
by (690 points)
I have a header, and I have passages within which the header shouldn't appear. I would like to use an (if:) command to tell the header not to appear when passages possess a certain tag. I know it's possible, because I had someone try to explain it to me weeks ago, but I've long since forgotten who and how.

1 Answer

+1 vote
by (159k points)
selected by
Best answer

The (passage:) macro returns a Data-Map containing information about the current passage being shown, and the tags property of that Data-Map can be used to access an Array contain the names of all the passage tags assigned to the passage. You can use the contains operator to check if a particular passage tag is within that array,

(if: (passage:)'s tags contains "certain tag")[The current passage was assigned the 'certain tag' passage tag!]


by (690 points)
Thank you so much