Just for a Diversity of solutions, Coming late from Down under (In Sydney Australia)
<$text text={{{ [all[current]get[caption]] ~[{!!title}] }}}/> Regards Tony On Thursday, May 14, 2020 at 5:04:43 AM UTC+10, Scott Sauyet wrote: > > Can I replace part of the $:/core/ui/ViewTemplate/title tiddler with some > conditional logic? > > I've been working on auto-generating a static read-only TW5 to document a > system. It's been working quite well, thanks to some help from people on > this list. One thing I'm trying to do is to display the caption rather > than the title in the tiddler card header. But I need to do this > conditionally, because not every tiddler will have the caption property. > I've found that I can modify this: > > <h2 class="tc-title"> > <$view field="title"/> > </h2> > > > to this: > > <h2 class="tc-title"> > <$view field="caption"/> > </h2> > > > to achieve the change, but I'm hoping to do that conditionally with > something that works like this: > > <h2 class="tc-title"> > <if field caption exists><then><$view field="caption"/></then><else><$view > field="title"/></else></if> > </h2> > > > Obviously the syntax is nowhere near real, but I think it should > demonstrate what I'm trying to do. Is this readily achievable? > > Thanks, > > -- Scott > -- 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ec3d6fe0-d02a-4c1c-89fa-0fb14a8c2375%40googlegroups.com.