Sorry to re-open this, but now all of my backlinks also use the caption, 
see sidebar here <https://www.mentalnodes.com/>. What a weird behaviour! I 
want the caption to be the caption and the title to be the title.

The only reason I added a caption was so I could add a meta description for 
search engines with {{!caption} — is there another way I should go about 
this?

Thanks so much!

On Friday, April 24, 2020 at 9:14:26 PM UTC+1, Anne-Laure Le Cunff wrote:
>
> Wow, both - thank you so much!
>
> Eric, the detailed explanation was incredibly helpful. (and it did work)
>
> Very grateful, thank you!
>
> On Friday, April 24, 2020 at 8:52:14 PM UTC+1, Eric Shulman wrote:
>>
>> On Friday, April 24, 2020 at 12:22:58 PM UTC-7, Anne-Laure Le Cunff wrote:
>>>
>>> I want to create a page displaying the most recently edited tiddlers.
>>> This is my code:
>>>
>>> *<<list-links 
>>> filter:"[!is[system]!sort[edited]]-[tag[hide]]-[tag[meta]]">>*
>>>
>>> The weird thing that happens is that it gives me the list of most 
>>> recently edited tiddlers, but displays their caption field instead of their 
>>> title (see screenshot attached).
>>>
>>
>> The list-links macro is defined here: *$:/core/macros/list*
>> \define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage)
>> \whitespace trim
>> <$type$ class="$class$">
>> <$list filter="$filter$" emptyMessage=<<__emptyMessage__>>>
>> <$subtype$>
>> <$link to={{!!title}}>
>> <$transclude field="caption">
>> <$view field="title"/>
>> </$transclude>
>> </$link>
>> </$subtype$>
>> </$list>
>> </$type$>
>> \end
>>
>> Note these lines:
>> <$transclude field="caption">
>> <$view field="title"/>
>> </$transclude>
>>
>> What this means:
>> The $transclude widget will show the caption text of the tiddler.  If 
>> there is no caption field defined, it falls back to showing the title of 
>> the tiddler.
>>
>> What you can do:
>> Instead of using the <<list-link>> macro, you can create your own output 
>> using the <$list> widget.  Something like this:
>> <$list filter="[!is[system]!sort[edited]] -[tag[hide]] -[tag[meta]]">
>>    <li><$link /></li>
>> </$list>
>>
>> notes:
>> * in your posted code, you used "!sort[edited]"... however, unless you 
>> are creating that field yourself, there is no such field by default.  When 
>> you edit a tiddler, the TWCore automatically updates a field called 
>> "modified"
>> * the list that is generated will include *all* tiddlers in the 
>> document.  If there are a lot of tiddlers, the list will be very long 
>> (e.g., try this on tiddlywiki.com, and you will get 1258 items!).  You 
>> can use the [limit[...]] filter to keep the list from being too long.
>>
>> Thus, to only show the 50 most recent changes:
>> <$list filter="[!is[system]!sort[modified]] -[tag[hide]] -[tag[meta]] 
>> +[limit[50]]">
>>    <li><$link /></li>
>> </$list>
>>
>> enjoy,
>> -e
>> Eric Shulman
>> TiddlyTools.com - "Small Tools for Big Ideas!" (tm)
>> InsideTiddlyWiki: http://TiddlyTools.com/InsideTW
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2cb0d394-ca79-43ab-9c64-4da7f10f9213%40googlegroups.com.

Reply via email to