Wikified ViewFields?

71 views
Skip to first unread message

Mat

unread,
Jun 11, 2016, 1:08:26 PM6/11/16
to TiddlyWikiDev
What is the difference between fields and viewtemplates?

Tiddlers have the fields; title, tags, text etc and they are(?) all viewtemplates. But when I create a custom viewtemplate... does that make it a field? And what's the name of that field in that case?

The background for is reply from Jeremy to a question in another thread:

  • Does a ViewTemplate tax the system more than the average tiddler considering how viewtemplates are transcluded into all other tiddlers? 
Yes; put more clearly: the view template is highly critical to performance since it impacts each tiddler displayed in the story river.


This makes me think one ought to be able to create tiddler local "viewtemplates" instead. UI-wise a mesh between the text field and a custom field, so that any content in that freely named new field is wikified and displayed in view mode, just like the text field content is.

The occasional times I create viewtemplates, they typically start with a filter to test if the current tiddler fulfills some criteria - and the typical case is that very few tiddlers to fulfill it, so the viewtemplate isn't relevant for the typical tiddler.

So currently; viewtemplates show wikified content in viewmode but are global - and custom fields are local but not-wikified and not in viewmode. I want the best of both worlds.


<:-)

Jeremy Ruston

unread,
Jun 14, 2016, 12:05:56 PM6/14/16
to tiddly...@googlegroups.com
Hi Mat

What is the difference between fields and viewtemplates?

A field is a property of a tiddler. They have names and values. Internally there is also type information associated with fields, so that the core knows what type of editor to display for them within the edit template.

There is a single view template, called `$:/core/ui/ViewTemplate`. It is used as the template for rendering view mode tiddlers within the story river.

Internally, the view template transcludes all tiddlers tagged `$:/tags/ViewTemplate`; these tiddlers are referred to as "view template segments".

Tiddlers have the fields; title, tags, text etc and they are(?) all viewtemplates.

That isn't correct.

There is an edit template segment called `$:/core/ui/EditTemplate/fields` that displays all the fields that haven't been suppressed via the `$:/config/EditTemplateFields/Visibility/` mechanism.

Can you reformulate your original question taking that information into account?

Best wishes

Jeremy

But when I create a custom viewtemplate... does that make it a field? And what's the name of that field in that case?

The background for is reply from Jeremy to a question in another thread:

  • Does a ViewTemplate tax the system more than the average tiddler considering how viewtemplates are transcluded into all other tiddlers? 
Yes; put more clearly: the view template is highly critical to performance since it impacts each tiddler displayed in the story river.


This makes me think one ought to be able to create tiddler local "viewtemplates" instead. UI-wise a mesh between the text field and a custom field, so that any content in that freely named new field is wikified and displayed in view mode, just like the text field content is.

The occasional times I create viewtemplates, they typically start with a filter to test if the current tiddler fulfills some criteria - and the typical case is that very few tiddlers to fulfill it, so the viewtemplate isn't relevant for the typical tiddler.

So currently; viewtemplates show wikified content in viewmode but are global - and custom fields are local but not-wikified and not in viewmode. I want the best of both worlds.


<:-)

--
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/511f4914-86e9-4239-9dd8-805c53b982b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mat

unread,
Jun 15, 2016, 1:14:15 PM6/15/16
to TiddlyWikiDev
Jeremy, your detailed answer is very appreciated!

In fact, it conceptually clarified things so much that I was able to create a proof-of-concept for what I have in mind:


- multiple (and targettable) text fields
- pseudo viewtemplates - to enable push-transclusion and possibly also more efficient alternative to custom viewtemplates. I'd particularly like input on if the reasoning there about efficiency makes sense.

No overwrites. Pure wikitext (...due to incompetence in js ;-)

(BTW, for anyone with a super memory; The name ViewFields was used by me for a related but unsuccessful earlier attempt several months ago. This here is completely new.)

<:-)
Reply all
Reply to author
Forward
0 new messages