Hi Sergey,

The way a tiddler is displayed is determined by $:/core/ui/ViewTemplate . 
It loads the template in pieces, each of them has the tag  $:/tags/ViewTemplate 
(you can see the list using the filter [tag[$:/tags/ViewTemplate]].

The subtitle template, $:/core/ui/ViewTemplate/subtitle, is just one of 
them.

If you don't like the information that is currently in the subtitle, you 
can over-write the tiddler with an empty tiddler of the same name, or you 
can remove its tag. 

If you want additional information to be displayed instead, you can edit 
the subtitle tiddler with different wikitext, or you can add a new tiddler 
that also has the tag $:/tags/ViewTemplate, which will then also become 
part of the view template.

For example, if you make a tiddler called "Sergey's View Template 
component" and give it the tag $:/tags/ViewTemplate and the content 

<a href={{!!url}} target="blank">{{!!info}}</a>

then every tiddler that has the necessary fields will display some "info" 
that links to a "url".

To make this piece of the view template appear where we want it to, we can 
give it the fields "list-before" or "list-after", for example, you can give 
this tiddler the field list-after, with a value 
of $:/core/ui/ViewTemplate/subtitle and it will appear below the subtitle.

If you want to combine these two approaches, you could re-write the 
subtitle template to look like this:


<$reveal type="nomatch" state=<<folded-state>> text="hide" tag="div" 
retain="yes" animate="yes">

<div class="tc-subtitle">
<$list filter="[is[current]!has[info]]">
<$link to={{!!modifier}}>
<$view field="modifier"/>
</$link> <$view field="modified" format="date" 
template={{$:/language/Tiddler/DateFormat}}/>
</$list>

<$list filter="[is[current]has[info]]">
<a href={{!!url}} target="blank">{{!!info}}</a>
</$list>

</div>
</$reveal>


And it will display the link for tiddlers that have an "info" field and 
revert to default behaviour for those that don't.

If anything is unclear, please ask.

Regards,
Richard

-- 
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/6488c32e-6bf5-4ae5-8a53-2f118974e00c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to