[pmwiki-users] Conditional markup in head of template problem

Lars Eighner surname at larseighner.com
Thu Jul 19 22:03:39 CDT 2012


I put this in local/config.php:

Markup('noindex','fulltext','/\\(:noindex:\\)/',
'<meta name="robots" content="NOINDEX">');

This is part of my tmpl file:

 	<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv='Content-Style-Type' content='text/css'><!--markup:
(:if [ group Living || group Whisper ]:)(:noindex:)(:ifend:)
  --><link rel="shortcut icon" href="$SkinDirUrl/favicon.ico"
type="image/x-icon">
<title>$WikiTitle | {$Group} / {$Title} $ActionTitle</title>

The problem is that my meta tag ends up being wrapped in <p> </p>. Running
the <!--markup into lines was an attempt to fix this, but it didn't work
either.

It does that whether the second argument of Markup is fulltext or _end or
any value in between.

My motivation here is I want to keep pages in the Living group and the
Whisper group (which is like Talk but password protected) out of search
engines. But the general problem here is how to have conditional markup in
the head of a template, which might be, for example, used to vary styles
sheets.

I grepped scripts/ for <p>, but I cannot figure out where the wrapping <p>
</p> is being inserted.

-- 
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266




More information about the pmwiki-users mailing list