Mark,
I like your solution as you pass a macro output as a filter to a list
widget by using Wikify widget.
I did a small changes to your code as below and borrowed a css from
https://tiddlywiki.com/#Formatting%20List%20Results%20as%20Tables%20with%20CSS%20-%20Variable%20Column%20Method
No it works great:
\define mytiddlerslist(myfield)
<$list filter="[has[$myfield$]tags[]]"><$view field=title/> </$list>
\end
<div class="dynamic-table">
<$wikify name="mytiddlers" text=<<mytiddlerslist caption>>>
<$list filter=<<mytiddlers>> >
<span class="ditem">
<$transclude tiddler="$:/core/ui/TagTemplate"/>
</span>
</$list>
</$wikify>
</div>
<style>
.dynamic-table {
max-width:700px; /* could transclude tiddler width instead */
-ms-box-orient: vertical;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -moz-flex;
display: -webkit-flex;
display: inline-flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
flex-direction: row;
}
.ditem {
max-width:160px; min-width:160px;
flex: 0 0 2em; /* -grow, -shrink, -basis */
}
</style>Enter code here...
Create a tiddler in tiddlywiki.com and paste above code inside it.
What I am curious about it is as below
1. Is this a way to use the value of some variable in different scope or
program flow as Bimlas asked in his first post?
2. Why the code does not work without wikify widget? This is important
question: why maco call cannot directly be used?
-- Mohammad
On Saturday, January 5, 2019 at 10:07:26 PM UTC+3:30, Mark S. wrote:
>
> Hi bimlas,
>
> It took me awhile to understand what you wanted. What you want can be
> achieved with the Wikify widget. This is what I discovered from another
> thread post by Tony.
>
> So it goes approximately (exact syntax will vary -- untested code -- I'll
> let you bang your head working out the details ;-) )
>
> \define mytiddlerslist()
> <$list filter="[has[myfield]tags[]]"><$view field=title/></$list>
> \end
> <$wikify name="mytiddlers" text=<<mytiddlerslist>>>
> <$list filter="<mytiddlers>"/>
> </$wikify>
>
> Note that I didn't have to eliminate duplicate tags -- all TW lists are
> "compressed" automatically. That's either a feature or a problem, depending
> on what you want.
>
> HTH
> -- Mark
>
> ```
> In the list of tiddlers
> If tiddler meets a condition
> Add its tags to a list of tags
> end
> end
>
> Filter out duplications from the list of tags
> Show the list of tags
> ```
>
>
>
--
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/a3e95bea-22d6-41ed-8ccb-932b24a832b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.