tl;dr Seems that ^explode:/
doesn’t work inside the replace keywords {}
. Probably an escaping issue of some kind.
You can check this by replacing the outer keyword with something that will reveal what the inner section is being evaluated to.
%asset_status_code^append:{asset_url_path^explode:\/^index:2}%
= 2{asset_url_path^explode:\/^index:2}
which indicates that the {}
is failing to be evaluated, probably due to the /
. A simpler inner keyword works fine even with a modifier.
%asset_status_code^append:{asset_url_path^append:q}%
= 2/forum-sibling-keyword/subfolder/page2q
So modifiers work, but you can’t explode by /
. You could source essentially the same information a different way with asset_linking_lineage
%asset_url_path^explode:/%
= ["","forum-sibling-keyword","subfolder","page2"]
%asset_linking_lineage^as_asset:asset_web_path%
= [null,"forum-sibling-keyword","subfolder","page2"]
using this alternative source seems to work inside the replacement {}
%asset_sibling_prev^as_asset:asset_url_path^contains:{asset_linking_lineage^as_asset:asset_web_path^index:2}:1:0%
= 1
That being said, won’t it always evaluate to true for sibling assets?