ZenphotoCMS Forum
while next_news() loop question - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: while next_news() loop question (/thread-9361.html)



while next_news() loop question - micheall - 2011-12-09

So I'm not sure how to get this accomplished. What I'm trying to do is in the next_news() loop, I need to access the URL for the active news article. I've tried using printNewsURL and getNewsURL both and they trigger the following error:

Quote:[warn] mod_fcgid: stderr: PHP Fatal error: Call to undefined method ZenpageNews::getNewsBaseURL() in /home/micheall/domains/inthemdl.net/public_html/zp-core/zp-extensions/zenpage/zenpage-class-news.php on line 268
I'm assuming that it's because I'm not using it on the news object, however the printNewsTitleLink() etc function just fine. Am I missing somethign blindingly simple?

Edit:
Working with 12/6 nightly btw.




while next_news() loop question - acrylian - 2011-12-09

getNewsURL(getNewsTitlelink()) gets the full url or printNewsURL(getNewsTitlelink()) echos it of the current article.

The printNewsTitlelink() function is named a little missleading I admit as "titlelink" refers to the url name of an article and this prints a full `` setup and not just the titlelink itself.




while next_news() loop question - micheall - 2011-12-10

Ah ok, I figured that's what it was that I had to pass an object to it, just wasn't sure which one. Thanks.




while next_news() loop question - acrylian - 2011-12-10

Well, depends. getBaseNewsURL() is a class method of the main Zenpage class but for backward compatibility there is also a template function of the same name (that one is actual the original one, we just restructured the class stuff a little for 1.4.2 for improvement).