Stuck using conditional keyword modifiers

Matrix Version: 5.3.4.2
Soon to be on the latest version

I know I can do the following:

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

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>%

regards
N

Hi Nicky
Just replace the % with braces for the keyword replacement.
{asset_url}
Thanks
Peter

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

Give this a try

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

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.

Try:

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

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