Stuck using conditional keyword modifiers

(Nick Papadatos) #1

Matrix Version:
Soon to be on the latest version

I know I can do the following:

    <p class="text-right">
       <a class="btn btn-readmore" href="%asset_url%">read more</a>

But how do I use the following correctly or can this not be done i.e nested keywords?

   %asset_metadata_has_fullstory^eq:yes:<p class="text-right"><a class="btn btn-readmore" href="%asset_url%">read more</a></p>%


(Peter McLeod) #2

Hi Nicky
Just replace the % with braces for the keyword replacement.

(Nick Papadatos) #3

Thanks Peter - tried that but it didn’t work
see attached:

(Erwin Strobel) #4

Give this a try

<p class="text-right"><a class="btn btn-readmore" href="%asset_url%">read more</a></p>

(Nick Papadatos) #5

Thanks Erwin - That’s a given if you look at my original post :slight_smile: I’m was trying the latter, I’m sure there’s a way to nest keywords but may not be able to with what I’m trying to do


Peter’s suggestion is spot on for newer versions of Matrix, if it’s just displaying as text for you I suspect you’ll need to add an additional modifier, ^replace_keywords into the mix.


   %asset_metadata_has_fullstory^replace_keywords^eq:yes:<p class="text-right"><a class="btn btn-readmore" href="{asset_url}">read more</a></p>%

(Peter McLeod) #8

yeah good call, just saw Nicky’s version is 5.3… the shorthand version {} came in 5.4.