[pmwiki-users] Conditional markup in head of template problem
Petko Yotov
5ko at 5ko.fr
Fri Jul 20 03:01:42 CDT 2012
If you want to set the meta robots directive to just these wikigroups,
create 2 files local/Living.php and local/Whisper.php and insert in them the
following:
<?php
$MetaRobots = 'noindex,nofollow'; # or just 'noindex'
See
http://www.pmwiki.org/wiki/PmWiki/GroupCustomizations
http://www.pmwiki.org/wiki/PmWiki/LayoutVariables#MetaRobots
If you want to control the meta robots directive from single wiki pages, or
from GroupHeaders or GroupFooters (but not from SideBars), see
http://www.pmwiki.org/wiki/Cookbook/ControllingWebRobots
Petko
Lars Eighner writes:
> 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.
More information about the pmwiki-users
mailing list