Discussion:
[tw] [TW5] Creating a ViewTemplate to show some text above the content
'Alexander Eckert' via TiddlyWiki
2016-05-27 23:48:09 UTC
Permalink
Hi,

I'm new to TW and I try to create my own knowledgebase. Therefore I'm
building my own Plugins to use their function in different wikis.

ATM I'm trying to create a ViewTemplate to show some text (in this case the
author of a book) above the edited content of the tiddler. But every
content in the text-field is shown above my VieTemplate code.

I tried <transclude /> and {{!!text}} to show the text-content below, but
everytime I use this I get the content shown twice. Above and below the
name and link of the author.

How could I suppress the content at the beginning inside the ViewTemplate
and insert the text at the place I want the content to appear?

Kind regards,

Alex
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/befab68f-465e-4f75-883d-840a474685b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jed Carty
2016-05-28 07:35:05 UTC
Permalink
To do this you set where in the main view template you want your template
to appear. The normal tiddler view template is made up of a few separate
parts that are displayed using a list widget.
So to change the position or your viewtemplate in the order you can create
a field called 'list-after' and put the part you want your template listed
after in that field. The options are:

$:/core/ui/ViewTemplate/body
$:/core/ui/ViewTemplate/subtitle
$:/core/ui/ViewTemplate/tags
$:/core/ui/ViewTemplate/title

You will probably want to use $:/core/ui/ViewTemplate/tags.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/2869ff7a-b730-4ba4-8886-f1456f8a22bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Alexander Eckert' via TiddlyWiki
2016-05-28 14:30:06 UTC
Permalink
Thank you very much. This worked for me. I split up my ViewTemplate in
"before" and "after" and it worked =)

Nice, thanks.
Post by Jed Carty
To do this you set where in the main view template you want your template
to appear. The normal tiddler view template is made up of a few separate
parts that are displayed using a list widget.
So to change the position or your viewtemplate in the order you can create
a field called 'list-after' and put the part you want your template listed
$:/core/ui/ViewTemplate/body
$:/core/ui/ViewTemplate/subtitle
$:/core/ui/ViewTemplate/tags
$:/core/ui/ViewTemplate/title
You will probably want to use $:/core/ui/ViewTemplate/tags.
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/5af04a41-ae8e-424c-9daa-1a9317a6d91e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...