macro vs transclusion confusion (viewing fields)

44 views
Skip to first unread message

Dave

unread,
Nov 16, 2018, 6:32:51 PM11/16/18
to tiddl...@googlegroups.com
I don't understand why this macro (in the tiddler "fieldsHere(fhere)") doesn't work:

\define fhere()
<table class="tc-view-field-table">
<tbody>
<$list filter="[all[current]fields[]sort[title]] -text -tags -created -modified -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
</tbody>
</
table>

<<fhere>>

I.e. when I tag it $:/tags/Macro  and then put <<fhere>> in another tiddler, nothing shows up (assuming there are some custom fields there)

The custom fields show up in the original tiddler, and when I do this
{{||fieldsHere(fhere)}}
that works the way I want it to


In other words, I've solved my need to look at the fields in a particular tiddler without going into edit mode, but I would like to know why the macro version doesn't work (please :)



PMario

unread,
Nov 16, 2018, 7:00:21 PM11/16/18
to TiddlyWiki
Hi,

Did you try to add an \end marker?

\define fhere()
<table class="tc-view-field-table">
<tbody>
<$list filter="[all[current]fields[]sort[title]] -text -tags -created -modified -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
</tbody>
</
table>
\end



This works for me.

-m

Dave

unread,
Nov 16, 2018, 7:11:10 PM11/16/18
to TiddlyWiki
of course! now it works.  Well, hopefully someone will find the snippet of code useful at least, lol

Thanks Mario :)

Reply all
Reply to author
Forward
0 new messages