[pmwiki-users] Requiring HTMLHeader/HTMLFooter (was: togglelink recipe)
marc
gmane at auxbuss.com
Sat Jan 6 12:19:00 CST 2007
Patrick R. Michaud said...
> On Sat, Jan 06, 2007 at 11:11:30AM -0600, Jon Haupt wrote:
> > On 1/6/07, Hans <design5 at softflow.co.uk> wrote:
> > > Saturday, January 6, 2007, 10:19:41 AM, marc wrote:
> > > >> Is there a strong reason why the JS cannot be loaded into
> > > >> $HTMLFooterFmt instead? That's pretty well guaranteed to be output
> > > >> after all markup and other items...
> > >
> > > I updated both togglelink.php and showhide.php to load the javascript
> > > inside the function via $HTMLFooterFmt.
> >
> > Do note that this requires that your skin use <!--HTMLFooter-->
> > somewhere, or the code has nowhere to go. (the skin I was using
> > didn't, so I had to figure out what was going on when I updated!)
>
> Along these lines, I've been planning to change the skins code
> in 2.2.0-beta such that it returns an error if a skin template
> is missing the required <!--HTMLHeader--> directive
> (or <!--HeaderText--> for older sites).
>
> This means that any site that upgrades to 2.2.0 but is using
> a skin that is missing <!--HTMLHeader--> will stop working
> (but the error message will make it fairly obvious why, and
> there will be a configuration variable to suppress the check.)
>
> Skins that _really_ want to suppress the HTMLHeader will be able
> to provide a <!--NoHTMLHeader--> directive in the template.
>
> Questions:
>
> 1. Any reason PmWiki shouldn't generate an error if <!--HTMLHeader-->
> is missing from a template?
Not imo. That said, I think this raises the issue discussed a couple of
months back about CSS ordering and the use of pmwiki-core-css. i.e.
using:
<link rel='stylesheet' type='text/css'
href='$FarmPubDirUrl/css/pmwiki-core.css' />
<!--HTMLHeader-->
and nulling all the PmWiki $HTMLStylesFmt entries in skin.php.
> 2. Should we also require <!--HTMLFooter--> as well, and report an
> error if it's not present in the template?
If recipes are now relying on it, then I feel that it should be reported
as an error.
--
Cheers,
Marc
More information about the pmwiki-users
mailing list