Correct, I was originally trying to put it in a PL which was attached to a Content Container via a Content Template.
However, I am also testing / trying it with:
- PL applied directly to page via PL screen
- PL applied to asset contents via %asset_contents_paint_assetID%
Neither of the 3 approaches work.
Yet it works perfectly (with identical code) if I put the code straight into a Content Container of the end page. (But linking this container into every page isn’t ideal, because Simple Edit users won’t be able to create new pages).
As for the tagif modifier — that seems to work. So for this instance that will be a good workaround.
However, I do know there are other instances where the content to show isn’t an asset attribute/metadata/etc that can be called from a keyword… So will have to see if I can find an alternative or fix for those situations. (I could make the text in a metadata field, but it would still need to depend on a different metadata field to decide whether the block of text should show or not; i.e. “if there is a video in video-field then show text-field at this place further down the page. Else, if no video, show this static image instead”.)
However, it is good to know there is not some obvious thing I am forgetting / overlooking that is causing this weird behaviour…
The odd thing is, when I apply a paint layout to an asset listing Type Format, it worked perfectly fine. o.O
(That was using the ‘old’ style Conditional Keyword, as I was wanting it to check if ANY of 5 fields were ‘true’.)