making Tiddlers hidden

802 views
Skip to first unread message

FBachofner

unread,
Oct 25, 2016, 1:31:05 AM10/25/16
to TiddlyWiki
Is it necessarily "safe" to add a $:/ to a tiddler name to "hide" it?

Is there another way?
Message has been deleted

Jed Carty

unread,
Oct 25, 2016, 1:44:24 AM10/25/16
to TiddlyWiki
There isn't anything unsafe about adding $:/ to a tiddler title. It gets no special privileges, it just isn't listed in recent and in a few other places.

FBachofner

unread,
Oct 25, 2016, 1:53:27 AM10/25/16
to TiddlyWiki
So expanding the universe of "system" tiddlers is considered OK and a best practice?  [ I really like that this precludes them from being found in basic search! ]

It looks like there are 133 "system" tiddlers to begin with.  I would end up with a lot more as I am contemplating this scheme for transcluding such "hidden" tiddlers . . .

Is there possibly another "preferred" way or am I on the correct path?

Thanks in advance!

Tobias Beer

unread,
Oct 25, 2016, 2:29:19 AM10/25/16
to tiddl...@googlegroups.com
Hi there,
 
Is it necessarily "safe" to add a $:/ to a tiddler name to "hide" it?

The problem with that is that "hide" can mean a whole range of things. But, in general, I very much agree. For example, I want to be able to define a template called foo... that is listed nowhere, so I can do {{||foo}} rather than {{||S:/_somewhere/foo}}. For that, it would require something like a tag called $:/tags/Hide. I advocated that before, but it was rejected.

extend "hidden tiddlers" to include specially tagged tiddlers

Generally, you can just use the system namespace, preferably with a prefix, e.g.:

$:/_/my tuff
$:/_FB/my tuff

 ...whichever sounds ok, but doesn't address a core namespace that is already used. So you perhaps shouldn't do something like:

$:/macros/foo

even if you could.

I actually made a pull request

implements #2086, SystemTemplates

that would have allowed you to use:

{{||foo}}

even if the template was actually at:

{{||$:/config/templates/foo}}

...for:

template lookup via field

...but those, too, were rejected.

Best wishes,

Tobias.

PMario

unread,
Oct 25, 2016, 8:21:44 AM10/25/16
to TiddlyWiki
Hi FBachofner,

TiddlyWiki has 3 basic types of tiddlers.

 - Standard
 - System
 - Shadow

Standard tiddlers can be seen by everyone. They basically create "the content" of a tiddly wiki which can be read / "consumed" by users.

System tiddlers are an easy way to hide "framework tiddlers" form users. "Framework tiddlers" are created by content creators, that produce wiki's for others. The framework most of the time, should make work easier for the creator, but are not necessarily useful, for newbie users. To make the process easy for creators, System tiddlers use a $:/ prefix and are excluded from standard list filters, that are used by the TiddlyWiki core. So System tiddlers stay out of the way.

Shadow tiddlers are also prefixed with $:/. So they are invisible by default. The whole TW core UI is built with shadow tiddlers. The power of shadow tiddlers is, that they can be overwritten, but _not_ deleted. So they can be changed by experienced users (eg: plugin authors). If a shadow tiddler is modified, it automatically becomes a System tiddler. So it stays out of the way, but allows the creator, to change the standard TW behaviour. The good thing with modified shadow tiddlers is: "If you mess up the function, you just delete the modified tiddler and the shadow tiddler takes over again" ... it was just overwritten!

-----

If you open the ControlPanel: Info: Basic tab  you get a list of the different types, with numbers. There is the advanced search icon, which shows you the lists. ...

-----

Back to your question about the "best practice" or as you wrote the "preferred" way:

If you create content for others, System tiddlers are a good way for you to "hide" stuff, that doesn't make sense to your users, but you need it to make your live easier. IMO you can safely hide it.

In my opinion, hiding content, that makes sense for your users, generally is a bad idea. .... So you should really just hide your "framework stuff" from them.

Example:
If you need eg: svg images, that you just "transclude into other tiddlers": don't hide them. It just makes your work harder and it has absolutely no impact on your users. Those images may be never changed again, so they will be listed at the very end of every list, or even fall out, if lists are limited. ... If you change them after 2 years, the image pops up and your users just see: "Ahhh, the image xyz.svg was changed." ... They'll have a short look at the new content and get new valuable information, without any additional work for you. If you would have hidden that image file you'd have to make an announcement, that you have changed that file. ... Just more work, which is probably never done ;)

As I wrote: "Hiding content is a bad idea" ...

 - If you need to hide content from your users, why do you bother to create it?
 - Framework that is confusing for newbies, should be hidden.

--------------

Tobias mentioned some special prefixes:

$:/_/my tuff
$:/_FB/my tuff

The underline in: $:/_ just takes care, that your system tiddlers is automatically at the top of the list, if you use standard sort order. ... This is a nice naming convention, that has proven to be useful. There is no special code in the core. Just a naming convention!

A second naming convention is called "namespaces" eg: $:/_FB/ ... Which would allow you to "namespace" your own system tiddlers and make them unique. So you can avoid duplicate names for common names. eg: settings


----- Ignore the following text if you don't want to dig deeper ;)

We use namespaces a lot! eg: core shadow tiddlers:

 - $:/core/xyz .. is used for the TW core stuff
 - $:/config/abc .. is used for configuration tiddlers
 - $:/language/... .. is used for translations 
 - ... and so on.

Plugins have a "special naming convention" ... no law ... just a convention!

$:/plugins/<authorName>/<pluginName/code.js
$:/plugins/<authorName>/<pluginName/readme, license, content, content ...

eg:

$:/plugins/tiddlywiki/browser-sniff

see the ControlPanel: Plugins tab for more info. ... Plugins are shadow tiddlers.


hope that helps!

have fun!
mario

PMario

unread,
Oct 25, 2016, 8:25:33 AM10/25/16
to TiddlyWiki
... One thing, that I forgot:

 - Go with the: KISS principle!
 - Don't over-engineer your TiddlyWiki

-m
Reply all
Reply to author
Forward
0 new messages