Feature request: Process addToBody

There's a related case to ProcessAddToHeadAdds, which perhaps should be called ProcessAddToBodyStart - it's needed by Google Analytics the new versions of which now wants to be invoked from the <body>

I had a discussion about this with someone on IRC a few days (18th Aug?) back. I don't recall with whom and the logs at http://koala.ilog.fr/twikiirc/bin/irclogger_logs/twiki are presently missing.
  • Guess you talked to iradel , whoever that may be, and it was on the 17th. wink

-- Contributors: MartinCleaver - 21 Aug 2008

Discussion

This kinda suggests that the ADDTOHEAD solution is not generic enough, and a "ADDREQUIRE"/"EXPANDREQUIRES" is needed. More later.

-- CrawfordCurrie - 21 Aug 2008

I imagine we once talked about recursive TMPL:DEFs like
TMPL:DEF{foo} TMPL:P{foo} add my stuff here TMPL:END
With this in place we could add to the body extending the SKIN path and redefining the beforetext or aftertext macro in a template recursively. Not sure if that roles back some of the findings we had on ProcessAddToHeadAdds.

-- MichaelDaum - 23 Aug 2008

I have implemented ProcessAddToHeadAdds. Any ideas how to proceed on this enhancement?

-- ArthurClemens - 26 Sep 2008

I don't think recursive TMPL:DEF's is obvious enough (for sure, I have difficulty getting my head around it). Aside from anything else, there is no way to populate a TMPL:DEF from plugin code.

This is rather like the problem we have with plugin handlers. You have to choose where in the rendering pipeline to call plugin handlers; similarly, the skin author has to choose where in the templates to support arbitrary content insertion.

Right now I'm favouring something like a generic version of ADDTOHEAD.

-- CrawfordCurrie - 27 Sep 2008

We have some nasty examples of string substitution in templates, for example SPLIT. But this creates horribly nested and hard to maintain code.

So I think so too: addToBody(postition) that can re-use code from addToHead. Where position could default to "end". Or $ if we use regex.

-- ArthurClemens - 27 Sep 2008

Proposal has been "resting" since 2008. Obviously no-one wants it enough to implement it, so Rejected.

-- CrawfordCurrie - 21 Feb 2012

 
Topic revision: r3 - 21 Feb 2012, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy