Feature Proposal: Deprecate the TMPL language
The TMPL language is a very obscured and yet vital part of foswiki WikiApplications
. This makes it much harder for new users that are buildingup confidence in TML applications to get to the next level.
Investigations that I did in 2006 showed that TMPL and SECTIONal INCLUDEs are similar, and TMPL directives can be converted into INCLUDEs via an importer.
There are some missing links to ensure the SKIN path is compatible, and presumably some interesting side effects wrt Preference evaluation, but these should be fixable.
Description and Documentation
The Template system would
- have a JIT cache that converts from tmpl to SECTIONal INCLUDEs
- The CachedIncludes system would speed up the use of SECTIONs providing a speed advantage over TMPL's
Additionally this would give us a chance to simplify and define Section names for important parts of Skins
-- Contributors: SvenDowideit
- 22 Apr 2012
Please specify how view templates can be cascaded using sectional includes.
- 23 Apr 2012
I presume you mean how
gets expanded to each of the Skin path elements -
if so - agreed - this is the hard bit, and why its not commited to
My current thinking involves using some variation on a stack to PUSH to the list of candidate topics onto the local scope - and then to POP them off as time goes. POP
are basically uses of %SET
and i think
will rely on the scope being local but persistent to the topic.
so if all uses of
are rendered as
- which adds a list of topics based on skin path
(er, yes, i realise that I have the direction of the order wrong, but meh)
to summarise: rather than making
be a paste contents of a skinpath serise of files into the evaluation stack and then removing most of them, build a Skin path stack that is used to import just the sections we use.
this then creates the possibility that a skin can be evaluated using a single external store's query, after navigating the TMPL:INCLUDE stack.
(caveat - i think this might work, but won't know til we try)
- 23 Apr 2012
Changing to discarded. No developer, and it is more experimental than ready for implementation.
- 13 Feb 2016