[pmwiki-users] help with bad meta info when using pagelist templates to generate thumbnail galleries

Petko Yotov 5ko at 5ko.fr
Sun Jan 11 15:18:15 CST 2009

On Sunday 11 January 2009 19:54:48 Derek Lerner wrote:
> (:description [[http://www.PATH TO IMAGE.jpg"Alt text goes here"-
>  >{$FullName}]]%%<br>'''Bold Caption'''<br>Sub caption:)
> when served the meta comes out as...
> <meta name='description' content='[[http://www.PATH TO IMAGE.jpg"Alt
> text goes here"-&gt;Group.PageName]]%%<br>&#039;&#039;&#039;Bold
> Caption&#039;&#039;&#039;<br>Sub caption' />
> as opposed to only showing the alternate text.
> <meta name='description' content='Alt text goes here' />

> Is there a way to do this without using the description directive? For
> instance make my own (:teaser:) directive that would work in the same
> way as (:description:) does when used in conjunction with a custom
> pagelist template.

Yes, use a PageTextVariable (note the colon after :teaser: ):
   (:teaser: http://image"alt" whatever '''bold''':)

and display this variable in a PageList template (note the colon):

If you need a separate description, add it with (:description Cool:)

To automatically place the description as Alt of the image, use 
   (:teaser: http://image"{$Description}" whatever '''bold''':)

Note that you may need a recent (<year) beta of PmWiki for PageTextVariables 
to work.


More information about the pmwiki-users mailing list