NickyP
(Nick Papadatos)
April 18, 2019, 12:06am
1
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
PeterM
(Peter McLeod)
April 18, 2019, 6:03am
2
Hi Nicky
Just replace the % with braces for the keyword replacement.
{asset_url}
Thanks
Peter
NickyP
(Nick Papadatos)
April 18, 2019, 6:19am
3
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%
NickyP
(Nick Papadatos)
April 18, 2019, 6:36am
5
Thanks Erwin - That’s a given if you look at my original post 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
PeterM
(Peter McLeod)
April 18, 2019, 11:30am
8
yeah good call, just saw Nicky’s version is 5.3… the shorthand version {} came in 5.4.