How to add 'references' and 'tagging' to the tiddler template.

481 views
Skip to first unread message

Mark Bishop

unread,
Mar 30, 2016, 5:00:56 AM3/30/16
to TiddlyWiki
Hi all,

I'm a big fan of tiddlywiki, but I'm not a programmer, and not familiar with the code of tiddlywiki. I have a basic requirement, have searched, but couldn't find the solution. 

Is there a way to edit the template to show the following information in each tiddler:

* References - where the tiddler is being referenced (in other tiddlers)
* Tagging - which other tiddlers are tagged with the tag.

Actually, thinking about it would be great to know how I could add any of the content from the 'information' section to the template. I had used Taggly Tag on the classic tiddlywiki and this is sort of what I'm trying to replicate.

Thanks in advance. 

PMario

unread,
Mar 30, 2016, 7:25:21 AM3/30/16
to TiddlyWiki
On Wednesday, March 30, 2016 at 11:00:56 AM UTC+2, Mark Bishop wrote:
Hi all,
 
Hi Mark,
 
I'm a big fan of tiddlywiki,

Great :) 

but I'm not a programmer, and not familiar with the code of tiddlywiki.

IMO you don't need to be a programmer. ... just an interested user, that wants to dig a bit deeper ;) TiddlyWiki is made out of plain (but sometimes "tricky";) wikitext
 
I have a basic requirement, have searched, but couldn't find the solution. 

The ViewTemplate itself is a tagged list, which is dynamically built. ..(don't be afraid, there's no need to modify it. The link is just there for reference :)
The info tiddler is a tagged list too. So we can use its content as a template for our own footer.

Is there a way to edit the template to show the following information in each tiddler:

* References - where the tiddler is being referenced (in other tiddlers)
* Tagging - which other tiddlers are tagged with the tag.

How should it look like?

- Do you want the References and the Tagging tabs at the top or the bottom of the tiddler?
- Should it be permanently visible
- Both infos at the same time?
- or as tabs?
   - which one should be default?
...
...

hmmmm, so many questions. So many ways to get it done :)

Actually, thinking about it would be great to know how I could add any of the content from the 'information' section to the template. I had used Taggly Tag on the classic tiddlywiki and this is sort of what I'm trying to replicate.

OK. I take your word:" it would be great to know how I could add any ..."

I'll create a fast step by step how to (next post). So you have a starting point!

have fun!
mario

There will be something to import too :)

PMario

unread,
Mar 30, 2016, 7:51:00 AM3/30/16
to tiddl...@googlegroups.com

We will create our own TiddlerFooter that is similar to the info tiddler section with tabs.

1)
Create a new tiddler named: TiddlerFooter    and tag it with: $:/tags/ViewTemplate
So it will automagically show up at the end of every tiddler. ...
You can easily test this, if you enter some "dummy text" and save. ...

2)
Now, copy the following content into TiddlerFooter

<hr>
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[TiddlerFooter]!has[draft.of]]" default="TiddlerFooterReferences"/>


Since we don't have any tiddlers tagged TiddlyFooter yet. ... This list will be empty.

3)
in advanced search open: TiddlerInfo/References
see: [3]

4) open and clone it  (the more tiddler toolbar has the clone button!)
5) rename it to: TiddlerFooterReferences   remove all tags and tag it: TiddlerFooter


After saving a "Reference" tab should show up in every tiddler.


6) advanced search open: TiddlerInfo/Tagging
7) open and clone it
8) rename it to: TiddlerFooterTagging   remove all tags and tag it: TiddlerFooter


After saving you should now have 2 tabs and "Reference" should be the default. See default from TiddlerFooter

References  |  Tagging

-> \o/ Done!  Ready for experimenting on your own ;)

have fun!

PS: If you want to hide the footer just search for "reveal widget" in the group
PPS: Something to import follows :)

[3] http://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FTiddlerInfo%2FReferences
[6] http://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FTiddlerInfo%2FTagging

PMario

unread,
Mar 30, 2016, 7:54:23 AM3/30/16
to tiddl...@googlegroups.com
Download and Drag and drop import this json file into tiddlyWiki.com to test it.
have fun!
mario
tiddlers.json

marginal gains

unread,
Mar 30, 2016, 8:51:25 AM3/30/16
to TiddlyWiki

Mario,

You are a total star thank you so much for this! This is exactly what I was looking for. I also really like the way each tiddler remember which tab was last opened. 

It is working really well with my usecase of logging a journal of places I've been and when. 

Here's a quick hosted sample:

Really appreciate it mate - this has really solved a problem for me, and made my experience of Tiddlywiki even better! I'm sure I'll be back with more questions, but for now - thanks again!

Cheers and all the best,

Mark

PMario

unread,
Mar 30, 2016, 1:39:23 PM3/30/16
to TiddlyWiki
On Wednesday, March 30, 2016 at 2:51:25 PM UTC+2, Mark wrote:
Really appreciate it mate - this has really solved a problem for me, and made my experience of Tiddlywiki even better! I'm sure I'll be back with more questions, but for now - thanks again!

You are welcome!
cu
-m

Mark

unread,
Mar 30, 2016, 2:41:47 PM3/30/16
to tiddl...@googlegroups.com
Hi Mario,

One quick question on the functionality. Is there a way to sort by newest created first? On both Reference and Tags tabs - where is this controlled?

As an aside I can't seem to get any lists to sort by date. eg this filer:

<$list filter="[tag[Sunset]sort[created]]">
<<currentTiddler>>
{{||$:/core/ui/ViewTemplate/body}}
</$list>

Doesn't seem to sort by created. It's still alphabetical.

[-created]] doesn;t reverse the list either.

Cheers in advance.

Mark

PMario

unread,
Feb 13, 2017, 4:27:11 AM2/13/17
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages