Hi Richard

Many thanks for a solution!

Combine the two possibilities that would be wonderful. I did so:

<$reveal type="nomatch" state=<<folded-state>> text="hide" tag="div" 
retain="yes" animate="yes">
<div class="tc-subtitle">
Historic date:<$link to={{!!historic}}>
<$view field="historic" format="date YYYYMMDD" 
template={{$:/language/Tiddler/DateFormat}}/>
</$link> 
<$list filter="[is[current]!has[info]]">
Place:<$link to={{!!place}}>
<$view field="place"/>
</$link>
</$list> 
<$list filter="[is[current]has[info]]">
Place: <a href={{!!url}} target="blank">{{!!info}}</a>
</$list> 
Type of event:<$link to={{!!eventtype}}>
<$view field="eventtype"/>
</$link> 
</div>
</$reveal>

eventtype: Test
historic: 20160726
info: Wuppertal
url: https://de.wikipedia.org/wiki/Wuppertal

Historic date: 20160726  
<file:///D:/Infarmatika/TiddlyWiki/tw5test.html#20160726>Place: Wuppertal 
<https://de.wikipedia.org/wiki/Wuppertal> Type of event: Testing 
<file:///D:/Infarmatika/TiddlyWiki/tw5test.html#Testing>

Everything worked out! Only tiddler subtitle template now looks like.

$:/core/ui/ViewTemplate/subtitle
Historic date:  <file:///D:/Infarmatika/TiddlyWiki/tw5test.html#>Place:  
<file:///D:/Infarmatika/TiddlyWiki/tw5test.html#>Type of event: 
<file:///D:/Infarmatika/TiddlyWiki/tw5test.html#>
$:/tags/ViewTemplate

Historic date:  <file:///D:/Infarmatika/TiddlyWiki/tw5test.html#>Place:  
<file:///D:/Infarmatika/TiddlyWiki/tw5test.html#>Type of event:


It's not scary? Twice repeated subtitle. And everything is fine in other 
tiddlers.

Regards,
Sergey


вторник, 26 июля 2016 г., 3:36:53 UTC+2 пользователь RichardWilliamSmith 
написал:
>
> 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/4ba3da4d-46d6-42c2-86d0-043d6a4cd891%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to