Hi,
i want to check in a loop of album.php of the default template what the title of the next image is. This is because sometimes i have front and back pictures of one item (i mention front/back in the title).
This is the loop and i tried a couple of things but i always failed to find a proper solution.
[code]
while (next_image(false, $firstPageImages)):
$desc= getImageDesc();
// hide big pictures when not logged in...
if (zp_loggedin()){
$output.= "<div class='imagethumb'>
<img src='".getImageThumb(getImageTitle())."'></div>\n";
}else{
$output.= "<div class='imagethumb'><img src='".getImageThumb(getImageTitle())."'></div>\n";
}
$output.= "</div>";
$last_image=getImageThumb(getImageTitle());
endwhile;
[/code]
regards Volkan
Comments
`$custom = $_zp_current_image->getCustomData();` will return what you put in that field in ADMIN.
thanks i will use the custom data field but i want to display the front and back images next to each other. Thats why i need to know if the next image is the back of an item so that i can output different html.
it must be something like this but i don't know how to access information of the next image.
[code]
`
//next image
if ($_zp_NEXT_image->getCustomData()=='back'){
// don't close the div
echo "
}elseif ($_zp_current_image->getCustomData()==back){
//close the div containing two images
echo "
}else{
//standard one image div having no back image
echo "
}
`
[/code]
If you know an easier solution i would be gratefull to hear it...
regards Volkan
`$nextimage = $_zp_current_image->getNextImage()
if ($nextimage->getCustomData()=='back') {
...`
`
while (next_image(false, $firstPageImages)):
$desc= getImageDesc();
$output.= "
$output.= "
description:
".$desc."
// hide big pictures when not logged in...
if (zp_loggedin()){
$output.= "
}else{
$output.= "
}
if (strpos(getNextImageURL(),"back")!=''){
next_image(false, $firstPageImages);
if (zp_loggedin()){
$output.="
}else{
$output.="
}
}
$output.= "
$last_image=getImageThumb(getImageTitle());
endwhile;
`
gr volkan