Hi @LorenzGL

I tried your code on tiddlywiki.com and this code seems to work if I get 
what you're trying to accomplish:

\define create-tiddler-title()
[[[[$(currentTiddler)$]]]]
\end

\define class_sub() 
<$list filter="[is_subclass_of{!!title}]"> 
<<create-tiddler-title>>
<$macrocall $name="class_sub">/> 
</$list> 
\end

<$wikify name="all_subclasses" text=<<class_sub>> output="text">
<<list-links filter:"[enlist<all_subclasses>]">> 
</$wikify> 

This assumes that tiddler titles in the field "is_subclass_of" are always 
stored without [[ ]] ... so a tiddler couldn't be subclass of more tiddlers.

On tiddlywiki.com/prerelease there's the new "contains" operator and I 
tried:

\define create-tiddler-title()
[[[[$(currentTiddler)$]]]]
\end

\define class_sub() 
<$list filter="[all[tiddlers]contains:is_subclass_of{!!title}]"> 
<<create-tiddler-title>>
<$macrocall $name="class_sub">/> 
</$list> 
\end

<$wikify name="all_subclasses" text=<<class_sub>> output="text">
<<list-links filter:"[enlist<all_subclasses>]">> 
</$wikify> 

This works for a "is_subclass_of" field which contains a list of tiddler 
titles.


Let me know if I got it right,

BTC
 

> I'm working on creating a semantic structure in TW. U fortunately, this 
> requires recursive filters. I’m stuck trying to feed the output of a 
> recursive macro into a filter using wikify. The problem seems to be that 
> the macro is outputting a formatted list but the filter expects a title 
> list. I haven't been able to figure out how to solve the problem. The goal 
> is to display a list of all individuals of a superclass for individuals 
> that are only linked to subclasses but not the superclass. Here is my code: 
>
> \define class_sub() 
> <$list filter="[is_subclass_of{!!title}]"> 
> <$link><<currentTiddler>></$link> 
> <$macrocall $name="class_sub">> 
> </$list> 
> \end 
>
> <$wikify name="all_subclasses" text=<<class_sub>> output=html> 
> <<list-links filter:"[enlist<all_subclasses>listed[is_individual_of]]">> 
> </$wikify> 
>
> Any help on this would be greatly appreciated.

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bcb22767-3f90-4073-af9a-05a0fa4e7d5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to