This page is a recipe on how to create a shortcut (:multithumblist:) which can display all thumbnails from a list of pages. This recipe works both with the old and the new versions ot Thumblist.
(:multithumblist "Thumblist2.Order,Thumblist2.Sandbox" px=30 count=3:) |
(:multithumblist "Thumblist2.Order,Thumblist2.Sandbox" px=30 count=3:) |
(:multithumblist "Thumblist2.*" px=30 count=1 quiet=3:) |
(:multithumblist "Thumblist2.*" px=30 count=1 quiet=3:) |
The above is the same as writing :
(:thumblist Thumblist2.Page1 px=30 count=1 quiet=3:) (:thumblist Thumblist2.Page2 px=30 count=1 quiet=3:) (:thumblist Thumblist2.Page3 px=30 count=1 quiet=3:)
etc. We are using quiet=3 to prevent warning messages for pages where there are no uploaded pictures.
To enable the multithumblist markup, add the following code to your config.php:
Markup('multithumblist', '<thumblist',
'/\\(:multithumblist\\s*(.*?):\\)/ei',
"FmtMultiThumbList(\$pagename,PSS('$1'))");
function FmtMultiThumbList($pagename, $args)
{
$r = ''; $opt = ParseArgs($args);
$pagelist = ListPages( @$opt[''][0] );
foreach($pagelist as $v)$r .= "(:thumblist $v $args:)";
return $r;
}
To display a list of every first thumbnail in a gallery page, with a link to the gallery itself, we can do it with link=2:
(:multithumblist "Thumblist2.*" px=40 count=1 titlefmt="Visit ?p" link=2 quiet=3:) |
(:multithumblist "Thumblist2.*" px=40 count=1 titlefmt="Visit ?p" link=2 quiet=3:) |