<$view field="caption" format="wikified"/>{{!!caption}}<$view field="caption" format="wikified"><$view field="title"/></$view><$link to={{!!title}} tooltip="Click to open, View"><$view field="caption" format=text><$view field="title" format=text></$view></$view></$link>
but if you only want the result as text you can use a (side effect?) feature of the view widget
that displays its content if no value is returned
<$view field="caption" format=text>
<$view field="title" format=text></$view>
</$view>
Which on consideration is a very nice method by which to display something, such as the ability to create a field
if the field does not exist.
Regards
Tony
the caption field is generally wikified (and so can include formatting etc.) while the title is rendered as plain text.
I will revist this. I was doing something related and created something in the past that could have the answer.
So you are keen on loading the caption you want wikified?
Regards
Tony
We don't want to make the core toc-caption macro too complicated because it is typically rendered many times.
<$list filter="[all[current]has[caption]]"
emptyMessage="""<$view field="title"/>""">
<$transclude field="caption"/>
</$list>My knowledge of the innards being so limited, I make mistakes in choosing how to properly convey my ideas.
It looks like all of the format attributes remove the html or return it in text. I am looking for the html not to be removed.
I believe I am trying to see if the $view widget could have a format attribute (say called): wikified
The description of what it does would perhaps be: The field is wikified according to the mode attribute and the resulting HTML returned (ie HTML elements will NOT be removed)
On Thursday, February 7, 2019 at 6:35:09 PM UTC+7, Jeremy Ruston wrote:Hi SSTo answer your original question, there is a big difference between the view widget and the transclude widget.The view widget computes and renders a single string. The transclude widget recursively renders the target tiddler.That means that the view widget is a single item as far as the refresh mechanism is concerned. The results of the transclude widget, though, is a complete render tree, which can be selectively refreshed.We do have three formats for the view widget that wikify the string: htmlwikified, plainwikified, and htmlencodedplainwikified. These are all used deep in the saving process where refreshing isn't a concern.Best wishesJeremy
On Wednesday, February 6, 2019 at 4:53:53 AM UTC, S. S. wrote:Could I please have some opinions on - if adding a wikified format to the $view widget so that:<$view field="caption" format="wikified"/>
Would give the exact same result as:{{!!caption}}
Then if this could result in a feasible solution for Github issues:
#3624 Table of Contents toc-caption macro awkward behaviour
#3753 list-links & list-links-draggable : issue with empty caption.
My idea is to propose the below solution as a fix for the issue of an empty caption field returning an empty result instead of the title:<$view field="caption" format="wikified"><$view field="title"/></$view>
I do not have the capability to write the changes for a pull request myself, thus if this solution is found interesting, someone may implement it!
--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/93247384-7729-4345-98a4-78f7b38560c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
OK, just to be clear, the format “htmlwikified” will give you the HTML resulting from wikifying the target text. You get back the entire HTML string including tags.What do you mean by the HTML not being removed? Can you show a snippet of wikitext with the output you’re looking for?
R^^2^^D^^2^^ //isn't// Real - {{NewTid}}{{!!caption}}I believe I am trying to see if the $view widget could have a format attribute (say called): wikified
The description of what it does would perhaps be: The field is wikified according to the mode attribute and the resulting HTML returned (ie HTML elements will NOT be removed)It sounds like a description of the transclude widget….
--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/e15b0af8-0c80-464f-a044-92bbed0d0ee1%40googlegroups.com.
The TranscludeWidget treats any contained content as a fallback if the target of the transclusion is not defined (ie a missing tiddler or a missing field).
The content of the <$view> widget is displayed if the field or property is missing or empty.
<$text text={{!!caption}}/>
<$view field="caption" format="text"/>--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/f21ad4a0-4ed4-4215-b10d-31112d5b9384%40googlegroups.com.
<$view field="…" format="wikified">is no longer supported. It was an early inconsistency that format="wikified" was a pseudonym for transclusion. You'll notice that the remaining formats for the view widget all result in a simple string being inserted into the widget tree, not a subtree, as occurs with transclusion.
To answer your original question, there is a big difference between the view widget and the transclude widget.
The view widget computes and renders a single string. The transclude widget recursively renders the target tiddler.
That means that the view widget is a single item as far as the refresh mechanism is concerned. The results of the transclude widget, though, is a complete render tree, which can be selectively refreshed.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddly...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/b6e51eee-f726-424c-90ce-9b08a0dd3cfa%40googlegroups.com.