> the syntax <div macro="tiddler [[subform]] with: {{tiddler.title}}"></
> div>  was not working correctly,
> but this one <div macro="tiddler subform with: {{tiddler.title}}"></
> div> is working perfectly

oops... sorry about that.... I forgot about the *special usage* of
[[...]] in templates:

When a template is rendered, the first thing the TW core does is to
find all instances of [[...]] within the template source and replace
them with the contents of the tiddler named within the brackets.
Then, only *after* recursively expanding all embedded [[...]]
references, is the resulting template source definition actually
rendered.

Although this special handling makes use of [[...]] to 'quote' a
tiddler title within templates problematic, it also permits very
powerful re-use of shared template definitions.  For example, in the
ViewTemplate, you could put the tiddler title, subtitle and toolbar
template syntax into a separate ViewTemplateHeader tiddler, and then
simply embed "[[ViewTemplateHeader]]" in the standard ViewTemplate.

Then, using
   http://www.TiddlyTools.com/#TaggedTemplateTweak
you can create alternative view templates for specific tagged
tiddlers, e.g., FooViewTemplate, BarViewTemplate, etc., each of which
has "[[ViewTemplateHeader]]" embedded in it, so that they all share
the same layout for title, subtitle and toolbar commands, but have
different <div class='viewer'>...</div> section to show a tag-specific
layout for the tiddler content itself.

enjoy,
-e

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to