Process contents of a field before transclusion

22 views
Skip to first unread message

Sandip Deshmukh

unread,
Aug 26, 2021, 10:23:50 AM8/26/21
to TiddlyWiki
A tiddler 'King George' contains a field 'family-members' that has the value [[Mary]] [[Henry]].

The code

 <$list filter="[get{!!family-members}]">
        #{{!!title}}
    </$list>

produces

#Mary #Henry

I want to put this code in a tiddler 'HashTaggedFamilyMembers' and use that as a template tiddler. So, I can put

{{||HashTaggedFamilyMembers}}

in any tiddler and get the list of family members with # before each name.

Of course, if there is an easier way of doing it, please let me know. But it needs to have transclusion.

Stobot

unread,
Aug 26, 2021, 11:17:11 AM8/26/21
to TiddlyWiki
Hello Sandip, which part isn't working for you? By your description it seems to work as you describe. My filter text is a little different using enlist, but otherwise as you decribe it?

screenshot.PNG

Sandip Deshmukh

unread,
Aug 26, 2021, 1:29:13 PM8/26/21
to tiddl...@googlegroups.com
Hello Stobot,

I wanted to modify 'HashTaggedFamilyMembers' and convert it into a template. 

Then I would be able to transclude it in any tiddler like

{{||HashTaggedFamilyMembers}}

and produce list of family-members of that tiddler with # before each name. 

I'm not able to do that.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/yxOw8hGBIJw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/895089d0-9968-4d1e-8b3b-29aec4fc79a4n%40googlegroups.com.

Stobot

unread,
Aug 26, 2021, 1:35:57 PM8/26/21
to TiddlyWiki
Hi Sandip - hmm well what I posted does what you're asking for unless I'm misunderstanding... Is it possible it's just simpler than you thought? In the screenshot the bottom tiddler is what you describe, and in the top one I'm using the bottom one as a template and it's indeed returning the list of family members (in that case Adam and John) prefixed with # as desired. 

Regarding "turn it into a template", I think it's worth noting as there's nothing you have to do to "convert" it, in fact ALL tiddlers can be used as templates. 

Sorry that I'm not understanding what you're trying to do. I must be missing something. 

Sandip Deshmukh

unread,
Aug 26, 2021, 1:55:31 PM8/26/21
to tiddl...@googlegroups.com
Stobot,

My most sincere apologies. 

Instead of transcluding the tiddler through the template, I was transcluding the template. 

In other words, I was missing '||'

I've added that and everything is working as expected. 

Thanks for all your help. 

Reply all
Reply to author
Forward
0 new messages