I’m trying to show a subset of fields, those whose names have a given prefix. I can do that fine, but when I try to remove that prefix from the display, I’m running into a wall I keep hitting: a less than full understanding of when and where I can use certain syntaxes.
So this works almost the way I want:
<$list filter="[<currentTiddler>fields[]prefix[criteria/]first[]]" variable="_">
!!! Criteria
<table>
<tr><th>Name</th><th>Value</th></tr>
<$list filter="[<currentTiddler>fields[]prefix[criteria/]]" variable="listItem">
<tr>
<td><$text text=<<listItem>> /></td>
<td><$view field=<<listItem>> /></td>
</tr></$list>
</table>
</$list>
rendering as
Criteria
Name Value criteria/ruleEffectiveDate 2010-01-01 criteria/ruleExpirationDate 2099-12-31
But when I try to strip those “criteria/” prefixes from my output, I keep failing. The latest attempt:
<td><$text text="[<listItem>] +[removePrefix[criteria/]]" /></td>
That yields:
Criteria
Name Value [<listItem>] +[removePrefix[criteria/]] 2010-01-01 [<listItem>] +[removePrefix[criteria/]] 2099-12-31
I’ve tried many syntaxes I know. But obviously not the correct one.
I’m sure this is a simple syntax mistake, but I keep finding these. So first, how do I fix this? Second, is there some shortcut to learning where and when the various syntaxes I’m learning can be applied?