I would like to print some information on the image page only if a certain tag exists for an image. E.g. If an image is tagged as a plant, I'd like to include its endangered status.
After reading several posts, it seems I should be able to do somehing like this:
`
<?php
if (in_array('Flora',getTags()) {
echo "Got It";
}
?>
`
This kills the page. As I don't know PHP, could someone correct what I am doing wrong?
Comments
http://www.zenphoto.org/documentation/classes/ThemeObject.html#methodhasTag
Again we have a documentation and try hard to name all function after what they do.
A 500 internal error I don't understand as well but on some later PHP 5 versions it might cause a notice to pass "getTags()" directly. Preferred is to first put the value into a var.
`
<?php
if($_zp_current_image->hasTag("Federally Endangered")) { ?>
- <?php echo "This species is federally Endangered."; ?>
<?php }`