I'm using my own theme. I'd like to have 'next' and 'previous' buttons on the news page just like the ones on image pages in Zenphoto, but I'm not sure what goes in the if-statement:
For the image pages, it's:
`
if (hasPrevImage()) { ?>
<?php } if (hasNextImage()) { ?>
`
works just fine, as here:
http://skellingtonart.com/fine/animals/muskox.gif.phpI thought that "GetNextNewsPageURL" would replace "getNextImageURL", but I don't know what replaces "hasNextImage" in the if statement.
Here's the current news page, with no next/previous buttons:
http://skellingtonart.com/news/More-Musician-SketchesI tried it *without* the if-statement, and it the page loads fine, but clicking the button gives a MySQl error:
"MySQL Query ( (SELECT title as albumname, titlelink, date,
@type1 as type FROM `zp_zenpage_news` ORDER BY date) UNION (SELECT albums.folder, albums.title, albums.date,
@type2 FROM `zp_albums` AS albums ORDER BY mtime) ORDER By date DESC LIMIT 10,10 ) failed. Error: Illegal mix of collations for operation 'UNION'"
Comments
http://www.zenphoto.org/documentation/plugins/zenpage/_plugins---zenpage---zenpage-template-functions.php.html#functiongetNextNewsURL
http://www.zenphoto.org/documentation/plugins/zenpage/_plugins---zenpage---zenpage-template-functions.php.html#functiongetPrevNewsURL
Please read the doc carefully as this does not return the url itself but an array with the link/url and also the title of the article.
Example usage (how printNextNewsLink() uses it internally):
`
$article_url = getNextNewsURL();
if(array_key_exists('link', $article_url) && $article_url['link'] != "") { // needed for checking if there is no next article
echo "Next;
}
`
I guess I maybe could also change the function to really just return the url...