This has probably been done plenty of times before.  A small template for 
displaying data fields of a tiddler when its in view mode without having to 
use "Info".  Where this differs from tiddler "Info", it doesn't show the 
standard fields (title, tags, type) but only the ones that display at the 
bottom of a tiddler edit page, the unique user created fields.

the visual format looks like this:

Hidden data fields of this page
*field name* : value *field name* : value *field name* : value

underlined (field names) will be in a <code> like border


It uses 2 spans-- one (ragsspannumb) to give the field name a border, 
reduce its text size a little and make it bold face.  The other span 
(ragsspannobrk) keeps the field name-data value together so they don't get 
separated by line breaks.

The container div and span borders for field names can be styled.

template tiddler, title: datafields display template (can be changed)

<div style="width:100%;margin:0px; padding:10px; border:dotted 1px;">
__Hidden data fields of this page__:<br/>
<$list filter="[all[current]fields[]!prefix[filter-field]sort[title]] 
-[all[shadows]removeprefix[$:/language/Docs/Fields/]]" variable="listItem" >
<span class="ragsspannobrk"><span class="ragsspannumb"><$text text=<
<listItem>>/></span> : <$view field=<<listItem>>/></span></$list>
</div>

the styles it uses, can also be renamed to suit needs

/* span nobreak */
.ragspannobrk {white-space: nowrap;}

/* span borders small bold */
.ragsspannumb {border:solid 1px; border-radius:4px; padding:0px 4px 0px 
4px; font-size: smaller; font-weight: bold;}

to use it, in any tiddler, use:

{{||datafields display template}}

-- 
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/c5018dc3-0f41-4909-8236-5fe3fcf57adf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to