Kind of like Design Patterns <https://en.wikipedia.org/wiki/Design_Patterns> for TiddlyWiki.
Possibly similar to the Factory <https://en.wikipedia.org/wiki/Factory_method_pattern> pattern. -- Mark On Thursday, December 13, 2018 at 11:50:06 AM UTC-8, Mohammad wrote: > > By accident I learned an amazing feature of *macrocall* widget during > experimenting with *Thomas Elmiger* extract macro. > > Thomas used variable to make aliases of macro and call them using > *macrocall* based on different condition. > > As an example see (this is only for demo purpose, so it is very simple) > > \define mac(mytag, output:"simple") > > > <$list filter="[tag[$mytag$]]" variable=v> > <$macrocall $name=<<__output__>> p=<<v>> /> > </$list> > > > \end > > > > where simple here can be for example > > \define simple(p) > <span style="color:red"><$view text=<<__p__>> /></span><br> > \end > > > You can call mac like > > <<mac "Concepts">> > > Now you can have a customized output like > > \define myout(p) > <li><$text text=<<__p__>>/></li> > \end > > <ol> > <<mac Concepts output:"myout">> > </ol> > > > So, this is a great TW5 capability and you can send your customized output > to a macro already developed by other. > This can also be used for core macro and lets user customize their output. > > You can test this on tiddlywiki.com! > > --Mohammad. > -- 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/c3ba2ed3-c0cf-44dd-bcec-7ee06a40c0a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

