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

Petko Yotov 5ko at 5ko.fr
Sun Jan 18 17:58:16 CST 2009


On Sunday 18 January 2009 23:51:31 Derek Lerner wrote:
> I upgraded to pmwiki-2.2.0-beta68 and this solution worked.
>
> Thanks again Petko.
>
> I'm now having a problem getting the teaser images to link back to the
> corresponding pages when using {$FullName} or {*$FullName} page
> variables.

> I also encountered the same problem when attempting to automatically
> place the description as the Alt of the image.
>
> (:Description text goes here:)
> (:teaser: [[http://image"{*$Description}"->{*$FullName}]]%%<br>'''Bold
> title'''<br>Subtitle:)

There is a difference between {*$Variable} and {$Variable} :

  {*$Variable} : the $Variable for the currently browsed page, even if 
                 this markup is in an included page, sidebar or pagelist.
  {$Variable}  : the $Variable for physical page where the markup is.

In your teaser you probably want to use {$Description} and {$FullName}.

You may need to add this to config.php (if the above does not seem to work):
  $EnableRelativePageVars = 1;


Thanks,
Petko

P.S. If may be simpler and easier for your writers to set in the wiki page 
only things that could not be extracted in the pagelist. You can use in the 
pagelist template {=$Title}, {=$Description}, {=$FullName}, add {=$:image} 
and {=$:Summary}.

In the page:

(:title This is my title, note there is no : after title:)
(:image:cool.jpg:)
(:Summary: This is my hidden subtitle:) or even
Summary: This is my visible subtitle


And in the pagelist:
 [@
[[#thumblist3]]
(:if equal {<$Group}:)
 >>lframe width=600px<<
(:if:)\
[[http://site/pics/{=$:image}"{=$Description}" -> {=$FullName} ]]\\
'''{=$Title}'''\\
{=$:Summary}
(:if equal {>$Group}:)
>><<
[[#thumblist3]]
@]

(also, \\ at the end of line means <br>).



More information about the pmwiki-users mailing list