On Wednesday, September 23, 2020 at 8:46:08 AM UTC+2, TonyM wrote: A little experimental fun; >
:) > This method uses the vars widget to pre-define a set of variables for use > inside the custom markup. As in this examples we have all out standard > address details using well known names. You choose which to use and how to > arrange them. Of course the variable are only available inside the vars > > \customize tick=address _element="$vars" address="N Blah St Randwick" name > ="Anthony Muscio" phone="612 4075581847" email="to...@virtual.com > <javascript:>" > > ´address Here we use <<name>> <<phone>> <<address>> > ´address Here we use <<name>><br>Phone: <<phone>><br><<address>> > > Nice idea! I like it. > > The following shows how the list widget with a pre-set filter can be used > to choose if the content is to be displayed or not, emptyMessage can be > used as well. > \customize tick=debug _element="$list" filter= > "[all[current]has:field[debug]]" > \customize tick=design _element="$list" filter= > "[{$:/config/design-mode}match[yes]]" > \customize tick=draft _element="$list" filter= > "[all[current]has:field[draft.of]]" > > ´debug Debug: in <<currentTiddler>><br>Transclusion=<<transclusion>> > ´design Show only when global design mode is set. to yes > > ´draft `Show only when Tiddler is in draft mode` > > Very interesting. I didn't think about that use case > This also triggers me to ask *Mario* > > - How do I get a new line, but not double, newline to be used in the > result(s)? > - Was it a specific Character? > > The space-space-enter plugin is installed on the page. So you can use either space-space-enter or space-space-backslash \ at the end of the line, to create a newline. But playing with your examples and newline .. I think, there is still a bug with \n and \n\n and whitespace handling. Will have a closer look. > > - Would it be costly to have an alias to \customize of \customise? For > me this is a common error. > > Very ;) ... No, it should be simple. > As expressed earlier, I would so love to pass the filter to a customized > list definition. > > Here we simply use list to access a canned list of tiddlers defined by a > filter > \customize tick=toc _element="$list" filter="[tag[toc]]" > > ´toc <<currentTiddler>><br> > > ´toc <$link/><br> > > ´toc <$transclude/><br> > Notice how common wiki text is all you need that refers to currentTiddler? > There is a new paramete <https://wikilabs.github.io/editions/custom-markup/#Custom%20Markup%20Definition>r: _srcName ... use this: \customize tick=list-a _element="$list" template="currentTiddler-template" _srcName=filter \customize tick=list-b _element="$list" template="link-template" _srcName=filter \customize tick=list-c _element="$list" template="transclude-template" _srcName=filter ´list-a [tag[toc]] ´list-b [tag[toc]] ´list-c [tag[toc]] The *-template tiddlers use: <<currentTiddler>> \ and <$link/> and <$transclude mode=block/> as their content. > - Empty message can also be used in the customise. > > In this case you can test is the current tiddler, or a named tiddler is a > member of the canned filter > \customize tick=toc _element="$list" filter="[tag[toc]]" > > ´toc <$text text={{{ [all[current]match[Basics]then[Matches Basics]] > }}}/><br> > > ´toc <$text text={{{ [all[current]match<storyTiddler>then[In TOC list]else > []trim[]] }}}/> > - however this second one produces empty lines. > Nice experiments. I'd like to ad them as test-xxx to the published version. Is that OK? have fun! mario -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikidev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/a062cbd8-7e1a-423e-b7e3-0cbd8e3a833fo%40googlegroups.com.