|
PITS /
00767Summary: New footer variable in template
Created: 2006-07-01 12:14
Status: Closed - added in 2.1.16
Category: Feature
From:
Assigned:
Priority: 555
Version:
OS:
Description: The <!--PageHeaderFmt--> in the template lets cookbook recipes programatically add javascripts at the head. Could we have one similar to this just before </body> tag so that writing clean html with javascript would be easier. Examples: Inserting through a recipe google's urchin script or site analysis deepmetrix script. --V.Krishn See also the GoogleMapAPI recipe, where we have to modify the skin tmpl file for JavaScript use. Des Thanks for GoogleAnalytics recipe. Some related rources: http://www.google.com/support/analytics/bin/answer.py?answer=26908 http://www.google.com/support/analytics/bin/answer.py?answer=45481 VKrishn August 20, 2006, at 04:32 AM Presently I am doing the following:
global $PageFooterScriptFmt;
foreach ($HTMLFooterFmt as $var => $value) {
$PageFooterScriptFmt = $PageFooterScriptFmt . "\n" . $HTMLFooterFmt[$var];
}
2. In skin.tmpl just before </body> I added: $PageFooterScriptFmt 3. Then in each cookbook recipe I insert:
if(!is_array($HTMLFooterFmt)) {
global $HTMLFooterFmt; $HTMLFooterFmt = array();
}
4. Then just like $HTMLHeaderFmt['analytics'] = "something" I would use $HTMLFooterFmt['analytics'] = "something" VKrishn August 20, 2006, at 04:49 AM Actually, it's the So, in order to programmatically insert things before the
closing </body> tag, we'd need a special Thanks for pointing Yes, it would help to ease and reduce scripting in my recipes that I was working on, Apart from that it would also help in making the code clean while inserting javascipts on page. VKrishn August 24, 2006, at 03:39 AM This feature was added in 2.1.16. Footer values can go into
In addition, as noted in the ReleaseNotes, the
Thanks! Pm |