List item template with macro?

Hi guys

I want to have an alternate List item template that displays the list item as:

View title, link to title, and macro to title.

I have <div class="tc-menu-list-item"><$view field="title"/> <$link>*</$link> <<moreinfo tid:"">></div>.

But I need the ‘tid’ of the macro to be the title of the tiddler.

If you need to see the (global) macro content, it is this:

\define moreinfo(tid) @@.donotprint &nbsp;<$button class="tc-btn-invisible" message="tm-modal" param="$tid$">^^{{$:/core/images/open-window}}^^</$button> @@

In other words, the list will give me the title, an asterisk link, and a button to open the entry as a modal.

Hi @DaveGifford

You could design a new macro which opens <<currentTiddler>> in a modal like this:

\define moreinfocurrent() @@.donotprint &nbsp;<$button class="tc-btn-invisible" message="tm-modal" param=<<currentTiddler>>>^^{{$:/core/images/open-window}}^^</$button> @@

Or you could use your current macro and call it through the <$macrocall> widget like this:

<div class="tc-menu-list-item"><$view field="title"/> <$link>*</$link> <$macrocall $name="moreinfo" tid=<<currentTiddler>> /></div>

Hope this helps,

Fred

1 Like

Genius. Thanks for both tips!

1 Like