On Mar 26, 3:18 pm, PMario <[email protected]> wrote:
> I think this is a related
> one.https://groups.google.com/group/tiddlywiki/browse_thread/thread/82d28...
> =====
>
> jQuery also seems to establish a templating mechanism [1]. Which is
> one level below Jon's list templating. But I think it should be taken
> into account. Since it seems that jQuery templating will go into a
> future jQuery core.
>
> May be it could also simplify some TW core functions.
> =====
>
> Thinking about sorted lists again, I found out, that the existing
> templating wouldn't work for something like this.
>
> <<list filter [tag[listIt]] template:##xx>>
> !xx
> <<tiddler /%tiddler.title%/ 'dp50'>>
>
> Which should produce a full text 2 column display. But /%tiddler.title
> %/ (pseudocode) can't be handled.
> 'dp50' could be 'twocolumn' also ..
>
> Using
> <<list filter [tag[listIt]] [sort[myOrder]] template:##xx>>
> would be incredible.
So essentially you want to make use of transclusion in templates to
access tiddler attributes/fields? If so I think the problem has always
been syntax (although I believe Eric makes suggestions in some of his
plugins for what this should be)
If we were to follow the jquery templates suggestion ${text} would
print the value of the text field on the current tiddler.
However don't we have this with the view macro? For instance <<view
title text>> can be used to print tiddler anywhere. The only problem
is when one wants to pass a parameter down to another tiddler. For
instance you might want to do something equivalent to <<tiddler <<view
image title>> >>.
I'm a bit confused by your example however.
If I understand correctly:
<<tiddler /%tiddler.title%/ 'dp50'>> wikifies the wikitext of the
tiddler with a class dp50 (see
http://macros.tiddlyspace.com/#%5B%5Btiddler%20macro%5D%5D)
but the same could be achieved in a template via
{{dp50{
<<view text wikified>>
}}}
no?
I've not played with jquery templates before, but I'm guessing one
could imagine updating the wikifier to support it.
For example if we took {£ to signal jquery template markup:
{£
{$title}
£}
could be wikified to print the title of the current tiddler. This
would then make the templating engine available to things such as the
list macro... I'd urge you to attempt it if you have the interest :)
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev?hl=en.