Adding to tiddler template head

6 views
Skip to first unread message

Amzg

unread,
Sep 4, 2008, 9:41:25 AM9/4/08
to TiddlyWiki
For a collaboration project I'm developing, I wish this command:

[_(More)] Provide more info on this.

...to be in the *head* of every tiddler, say to the right of the
tiddler name. (I have the necessary plugin installed.)
I don't know which template to put it into, or if it's a stylesheet,
or if there are several settings needed, etc. (I've never done things
with stylesheets etc... but adding the above line manually in every
tiddler has turned out to be, well...)

Thank you

/Mat

FND

unread,
Sep 4, 2008, 9:45:14 AM9/4/08
to Tiddl...@googlegroups.com
> For a collaboration project I'm developing, I wish this command: [...]

> ...to be in the *head* of every tiddler

You should add an element in the ViewTemplate, e.g.:
<div class='title' macro='view title'></div>
<div class='myCustomContainer' macro='myCustomMacro'></div>
Illustrated here:
http://tiddlywiki.pastebin.com/f52d1d5fe

HTH.


-- F.

Amzg

unread,
Sep 4, 2008, 2:42:21 PM9/4/08
to TiddlyWiki
Thank you - that was a very fast reply FND!
If I understand your answer correctly, I will have to write a "custom
container" and a "macro", and they should somehow include my command
line above.

Could someone please appoint me to some description how to do this
(or, even better; actually how to do it). I tried looking for
customizing tw.org, and various other tw-related places for help, but
the problem is probably that I don't quite know what to search for...

Thank you!

/Mat

wolfgang

unread,
Sep 4, 2008, 7:55:34 PM9/4/08
to TiddlyWiki
Hi Mat,

> Could someone please appoint me to some description how to do this
> (or, even better; actually how to do it).

take for example a look at this http://gensoft.revhost.net/Collapse.html#GettingStarted

Here a custom ViewTemplate was used to display an extra text in a
colored box above a tiddler. Compare the following two tiddlers:
ViewTemplate and ExampleTemplate, to see how the difference came
about.
.

An other approach would be the use of CoreTweak no. "609/610 toolbars
- separators and transclusion" by TiddlyTools:

http://www.tiddlytools.com.html/#CoreTweaks

Which enables to display anything with an additional command in the
regular tiddler toolbar, for example in a floating nested slider
(NestedSlidersPlugin) or as a Popup (ShowPopup script, also at
TiddlyTools; needs InlineJavascriptPlugin installed).

Again, study the examples in the ToolbarCommands tiddler at
TiddlyTools, to understand how this is donw.

Regards,

W.

Amzg

unread,
Sep 4, 2008, 10:05:18 PM9/4/08
to TiddlyWiki
Thanks Wolfgang, I really appreciate it

(Not wishing to make anyone "feel responsible" to answer my newbie
Q's, the following is a reply to your statement, but not specifically
to you. Thank you.)


> Compare the following two tiddlers: ViewTemplate and
> ExampleTemplate, to see how the difference came about.

Well, the difference is the hard coded text he put there, but I don't
see how that is relevant for my case.
FND informed I should put in "myCustomContainer" and "myCustomMacro".

My desired command line; "[_(More)] Provide more info on this."

..comes from the plugin (http://www.tiddlytools.com/#CheckboxPlugin ).
From the plugin code, where it says
"config.macros.checkbox", I figure FNDs ViewTemplate element becomes:

<div class='myCustomContainer' macro='checkbox'></div>

But as for "myCustomContainer"... I have no idea where to find it in
the CheckboxPlugin code.
And I have no idea how it should actually render the *full* line:
"[_(More)] Provide more info on this." - i.e including the "More" in
there.

... :-|

Thank you!!!

/Mat


> An other approach would be the use of CoreTweak no. "609/610 toolbars
> - separators and transclusion" by TiddlyTools:
>
> http://www.tiddlytools.com.html/#CoreTweaks
>
> Which enables to display anything with an additional command in the
> regular tiddler toolbar, for example in a floating nested slider
> (NestedSlidersPlugin) or as a Popup (ShowPopup script, also at
> TiddlyTools; needs InlineJavascriptPlugin installed).
>
> Again, study the examples in the ToolbarCommands tiddler at
> TiddlyTools, to understand how this is donw.
>
> Regards,
>
> W...

Eric Shulman

unread,
Sep 4, 2008, 10:23:03 PM9/4/08
to TiddlyWiki
> My desired command line;  "[_(More)] Provide more info on this."
> ..comes from the plugin (http://www.tiddlytools.com/#CheckboxPlugin).
> And I have no idea how it should actually render the *full* line:
> "[_(More)] Provide more info on this." - i.e including the "More" in
> there.

The "macro usage" section of
http://www.TiddlyTools.com/#CheckboxPluginInfo
includes the following documentation:
------------------------------------
In addition to embedded checkboxes using the wiki syntax described
above, a macro-based syntax is also provided, for use in templates
where wiki syntax cannot be directly used. This macro syntax can also
be used in tiddler content, as an alternative to the wiki syntax. When
embedded in PageTemplate, ViewTemplate, or EditTemplate (or custom
alternative templates), use the following macro syntax:

<span macro="checkbox target checked id onInit onClickBefore
onClickAfter"></span>
------------------------------------

Thus, for your "more" checkbox, you could write the following in your
ViewTemplate:

<span macro="checkbox More"></span> Provide more info on this

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
Reply all
Reply to author
Forward
0 new messages