Need assistance in creating a new template for the Photo Album plugin
Posted: Mon Jan 26, 2009 12:48 am
I am trying to create a new template which will, on a single page, loop through all the albums in the selected category and write all images to the page.
So far I have:
{foreach from=$albums item=album}
{$album->name}
// need to know how to get all the images from the album in the current loop and then loop through them and display them
{/foreach}
The main problem is that I don't know how to call a method against the current $album variable.
I have tried
{foreach from=$album->GetPictures() item=picture}
because there is a method in the Album class called GetPictures, but the $album variable is an instance of the stdClass class, not the Albumclass, but this does not work.
Any help would be greatly appreciated.
James
So far I have:
{foreach from=$albums item=album}
{$album->name}
// need to know how to get all the images from the album in the current loop and then loop through them and display them
{/foreach}
The main problem is that I don't know how to call a method against the current $album variable.
I have tried
{foreach from=$album->GetPictures() item=picture}
because there is a method in the Album class called GetPictures, but the $album variable is an instance of the stdClass class, not the Albumclass, but this does not work.
Any help would be greatly appreciated.
James