Tiddler Template For A Specific Tag?

348 views
Skip to first unread message

Gloria Lassich

unread,
Oct 24, 2017, 8:29:31 PM10/24/17
to TiddlyWiki
Is there a way to create a template that's just for tiddlers within a certain tag? I want to have all tiddlers under a certain tag to have specific content & formatting. Could someone tell me how to accomplish this (NOTE: I'm a beginner)? Thank you.

Mark S.

unread,
Oct 24, 2017, 10:08:19 PM10/24/17
to TiddlyWiki
I'm surprised there isn't a better write-up at tiddlywiki.com.

To add content by tag, create a tiddler and tag it $:/tags/ViewTemplate with this content:

<$list filter="[all[current]tag[HelloThere]]">
JUST PASSING BY.
</$list>

Only, replace "HelloThere" with the name of your tag and "JUST PASSING BY" with whatever your content is.

You can change formatting within tagged tiddlers using stylesheets. See http://tiddlywiki.com/#How%20to%20apply%20custom%20styles%20by%20tag for details

Good luck!
Mark

Gloria Lassich

unread,
Oct 25, 2017, 12:39:03 AM10/25/17
to tiddl...@googlegroups.com
Ok, I'm missing something somewhere because it's not working. Could you describe in detail step by step please?

Gloria

Hire me for design work:
Wear my designs
Designs for your etsy shop:
Shop My PaparazziAccessories Store:
Join My PaparazziAccessories Team:
My beauty blog:

...

[Message clipped]  

TonyM

unread,
Oct 25, 2017, 1:11:07 AM10/25/17
to TiddlyWiki
Mark,

This will add the content "JUST PASSING BY." to the bottom of a to a tiddler that is tagged HelloThere

I think gloria want to change more than that, perhaps even have a separate view template all together.

Regards
Tony

BJ

unread,
Oct 25, 2017, 2:44:02 AM10/25/17
to TiddlyWiki

Gloria Lassich

unread,
Oct 25, 2017, 5:43:19 PM10/25/17
to tiddl...@googlegroups.com
Hi Tony,
Yes, I wanted several lines of text to appear in the edit box whenever I create a tiddler with a specific tag. I guess I didn't explain myself well enough. In the meantime, I'm using a snippet.

I wanted a tiddler to automatically have the following in the edit box:

Address:

Initial:

RV1:

RV2:

RV3:

And then I would just fill out the info for each line. Maybe that's not possible w/a template? Let me know. :)

Gloria

Hire me for design work:
Wear my designs
Designs for your etsy shop:
Shop My PaparazziAccessories Store:
Join My PaparazziAccessories Team:
My beauty blog:

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/4WUg72UMkec/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@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/cdacda19-fc2a-4459-acc3-f1e2cf6cde5c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

RichardWilliamSmith

unread,
Oct 25, 2017, 7:04:08 PM10/25/17
to TiddlyWiki
Hi Gloria,

Mark's original solution adds content to the view template of tiddlers that have a particular tag. 

What you want, I think, is a pre-filled template in the text field of each new tiddler.

If you make a tiddler called (eg) 'myTemplate' and give it this text

Address:
Initial:
RV1:
RV2:
RV3:

and then make another tiddler and give it this text

<$button message="tm-new-tiddler" param="myTemplate">New Tiddler With Template</$button>


(note 'myTemplate' should match the first tiddler you made)

It should make a button that will create a new tiddler with the template text.

If you wanted to put this button in the page controls, you could give it the tag $:/tags/PageControls (although you would probably want it be be labelled with an icon and not a long string of text).

If this isn't what you want, please keep asking until we get it right!

Regards,
Richard

Gloria Lassich

unread,
Oct 25, 2017, 10:10:37 PM10/25/17
to tiddl...@googlegroups.com
Hi Richard,
This was great, thanks! The only question I have left is about the icon. I tried to set the page controls icon by using the icon field in the button tiddler, but all that did was add an icon to the tiddler & not the button. How do I apply an icon to the button?

Mark S.

unread,
Oct 26, 2017, 12:06:45 AM10/26/17
to TiddlyWiki
Something like this should get you started:

<$button message="tm-new-tiddler" param="myTemplate" tooltip="New Tiddler With Template" class=<<tv-config-toolbar-class>>>{{$:/core/ui/Buttons/info}}</$button>

In the advanced search under shadows you can search for existing buttons. They should be the ones that start $:/core/ui/Buttons...

There are probably other sources that people can tell you about.

Mark

Jed Carty

unread,
Oct 26, 2017, 9:27:58 AM10/26/17
to TiddlyWiki
Don't use the $:/core/ui/Button tiddlers, they are the actual buttons. The image tiddlers all start with $:/core/images

If you go to the advanced search and enter $:/core/images under the shadows tab you will get a list of all of the core icons.

If you want to see the icons themselves you can paste this into a wiki:

<$list filter='[all[shadows]prefix[$:/core/images/]]'>
<div style='display:inline-flex;'>
<$link to=<
<currentTiddler>>><$transclude/><br>Tiddler</$link>
<br>
</div>
</$list>

clicking on any of the images will open the image tiddler so you can get the name to put into your button.

Gloria Lassich

unread,
Oct 26, 2017, 7:39:34 PM10/26/17
to tiddl...@googlegroups.com
Thank you Mark, that did it! I created my own icon specifically for this & used the code you provided. It's just what I wanted. :)

Gloria

Hire me for design work:
Wear my designs
Designs for your etsy shop:
Shop My PaparazziAccessories Store:
Join My PaparazziAccessories Team:
My beauty blog:

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/4WUg72UMkec/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
Reply all
Reply to author
Forward
0 new messages