[pmwiki-devel] Embed script immediately after body

Petko Yotov 5ko at 5ko.fr
Sun Sep 5 10:03:58 PDT 2021


On 05/09/2021 11:10, Simon wrote:
> Does PmWiki have the ability to specify scripts to be added to a page
> directly after the body tag?

$HTMLFooterFmt is intended for this:

   $HTMLFooterFmt['my-recipe'] =
     '<script src="$FarmPubDirUrl/my-recipe.js"></script>';

Or possibly, if you want to allow customization:

   SDVA($HTMLFooterFmt, array('my-recipe' => '<script ...>'));


BTW, this is not added "after" the </body> tag but just before it. After 
it would be invalid HTML.

Petko



More information about the pmwiki-devel mailing list