
<$list filter="[all[]tag[Journal]]">
<$set name=year filter="[{!!title}split[]last[4]join[]]">
<<year>>
</$set>
</$list><$button>
<$list filter="[all[]tag[Journal]]">
<$fieldmangler>
<$set name=year filter="[{!!title}split[]last[4]join[]]">
<$action-sendmessage $message="tm-add-tag" $param=<<year>>/>
</$set>
</$fieldmangler>
</$list>
Add tag for year
</$button>The following will list all tiddlers with a Journal tag and extract the year number from the title,
- If you are using the default journal title format DDth MMM YYYY
- If you were using the created date or a journal date you could use firet[4] rather than last[4]
<$button>
<$list filter="[all[]tag[Journal]]">
<$set name=journal-tiddler value=<<currentTiddler>> >
<$fieldmangler>
<$set name=year filter="[{!!title}split[]last[4]join[]]">
<$action-sendmessage $message="tm-add-tag" $param=<<year>>/>
<$action-setfield $field=year $value=<<year>> />
</$set>
</$fieldmangler>
</$set>
</$list>
Add tag for year
</$button>