<<list-links filter:"[tag<currentTiddler>] +[sort[title]]">>

<<faceplant """Auuugh""">>

Yeah, the current documentation is flatout annoying - reviewing the filter 
info, I can see that now, but the context had changed so many times by the 
time I had gotten there I didn't even realize the significance of what I 
was seeing. So would [tag<title>] work just as well at that point to pull 
the tag from the Field?

Nope - evidently not. But aren't the fields supposed to be available as 
variables here? So if <currentTiddler> works, shouldn't <title> do the same 
thing?




On Thursday, June 25, 2015 at 12:49:02 AM UTC-4, Eric Shulman wrote:
>
> On Wednesday, June 24, 2015 at 7:12:55 PM UTC-7, Jonnan wrote:
>>
>> Okay, I'm definitely not getting this syntax. Obviously I'm at the 
>> 'waving a dead chicken over it' point, but generally I *can* wave a dead 
>> chicken over it.
>>
>
> Admittedly, TW5 has it's twists and turns.  But that's because it can do 
> so much!  Still, there is a bit of a learning curve, and the current 
> documentation doesn't really do it justice.
>
> Rather than trying to explain the depths of TW5 syntax here, I'll just try 
> to answer your immediate questions...
>
> I want to make a generalized version of this from the tutorial: 
>> <<list-links filter:"[tag[Tag Template]] +[sort[title]]" >> where 'Tag 
>> Template' is the current tiddler.
>>
>
> There is a built-in variable/macro named "currentTiddler".  Used in wiki 
> syntax, you can write <<currentTiddler>> to *display* the title of the 
> current tiddler.  To use the variable value in filter syntax, instead of 
> [tag[text]], you can write [tag<variable>].  Thus:
> <<list-links filter:"[tag<currentTiddler>] +[sort[title]]">>
>
> After going through many variation trying to shoehorn variations of 
>> $title$ {title} <$title$> and currentTiddler in that spot I found this 
>> thread.
>> Given ...
>> <$set name=title value={{!!title}}
>> <<xxx>>
>> </set>
>>
>> \define tags-test1() <$list filter="[tag[$(title)$]]+[sort[title]]" /> 
>> <<xxx>> returns tag1tag2tag3... no ordering, but almost what I want.
>>
>
> you could write:
> filter="[tag[$(title)$]] +[sort[title]]"
> (put a space between the two filter "runs")
> or:
> filter="[tag[$(title)$]sort[title]]" 
> (make one run with both tag and sort operators)
>
> \define tags-test2() <$list-links filter="[tag[$(title)$]]+[sort[title]]" 
>> /> 
>> <<xxx>> returns Undefined widget 'list-links'
>>
>
> "list-links" (without the "$" prefix) is a TW core-defined *macro*.
> To invoke a TW5 macro, use
> <<macroname param:"value" param:"value">>
> syntax.  Thus:
> <<list-links filter:"[tag[$(title)$]] +[sort[title]]">>
>  
>
>> \define tags-test3() <$list-links filter:"[tag[$(title)$]]+[sort[title]]" 
>> /> 
>> <<xxx>> returns <$list-links filter:"[tag[Tag Template]]+[sort[title]]" 
>> /> 
>>
>
> Macros don't "wikify" their content before returning it.  They simply 
> return their text, unaltered except for replacing the $(variable)$ and 
> $param$ markers with the corresponding values.
>
>>
>> I'm really not getting the syntax of the system here, even well enough to 
>> reproduce it for what ought to be really simple things, and the tutorial 
>> seems to me to skip from simple To do this one thing do 'X' to "It really 
>> quite easy you see <X{$(Y[X])$}> passes the variable as a parametrized 
>> function using the context of the Y-macro to reverse the polarity of the 
>> neutron flow".
>>
>
> I can appreciate your pain.  The best way to address this is to keep 
> asking *specific* questions that have practical application.  That way, we 
> can zero in on *examples* that really work.
>
> In the mean time: NEVER EVER REVERSE THE POLARITY OF THE NEUTRON FLOW.... 
> unless you have a charge of at least 1.21 gigawatts in your flux capacitor! 
>  (and it helps if you are going faster than 88mph).
>  
>
>> I'd like to know where I went wrong in translating this to my tag-list 
>> function/template, but I'd really *love* to know if there an intermediate 
>> tutorial floating around somewhere that Googles not finding? I don't recall 
>> the old tiddlywiki being this obfuscated?
>>
>
> TiddlyWiki Classic was just as quirky, if not more so.  The difference is 
> that TW5 has *much* more powerful syntax... and with that power comes 
> complexity.  Still, it's worth the journey.  
>
> enjoy,
> -e
> Eric Shulman
> ELS Design Studios
> TiddlyTools - "Small Tools for Big Ideas!"
> InsideTiddlyWiki: The Missing Manuals
>
> YOUR DONATIONS ARE VERY IMPORTANT!
> HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
>    http://TiddlyTools.github.com/fundraising.html#MakeADonation
>
> Professional TiddlyWiki Consulting Services...
> Analysis, Design, and Custom Solutions:
>    http://www.TiddlyTools.com/#Contact
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0722334e-c8a8-41ad-8d96-015ca7656d49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to