ZenphotoCMS Forum
Bug in printCustomPageURL w. rewriteTokens - 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: Bug in printCustomPageURL w. rewriteTokens (/thread-11642.html)



Bug in printCustomPageURL w. rewriteTokens - WhyT - 2014-02-17

Hi!
i use mod_rewrite and for albums and images it works fine, but if i add a link to a page it returns the wrong url.
when i use:
printCustomPageURL("my Page","thepage");
i get this URL back:
/page/thepage (deliver a 404)
but the right url must be /pages/thepage
i have the laterst ZP and it is a fresh install i dont changed anything in the .htaccess or core files.

ideas?

greets from Austria
Michael




Bug in printCustomPageURL w. rewriteTokens - acrylian - 2014-02-17

Quote:printCustomPageURL("my Page","thepage");
i get this URL back:
/page/thepage (deliver a 404)
but the right url must be /pages/thepage
No, you are calling a (static) custom page and that is the correct url. For that to work you have to have a theme page name thepage.php.

/pages/thepage would be the url of a Zenpage CMS plugin page which is something different. If that works depends if the theme used has Zenpage support.




Bug in printCustomPageURL w. rewriteTokens - WhyT - 2014-02-17

thx for reply!

i made my own theme with Zenpage CMS support.
so printCustomPageURL is the wrong way to get a link of a CMS page?
how get i the right link? or do i have to format it manualy via a static




Bug in printCustomPageURL w. rewriteTokens - acrylian - 2014-02-17

You can do both via the template functions (for bascially all functions: get = plain data, print = full html element):
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functiongetPageLinkURL
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionprintPageLinkURL

Or use the object model behind this all directly.




Bug in printCustomPageURL w. rewriteTokens - WhyT - 2014-02-18

thx!
printPageLinkURL is what i need




Bug in printCustomPageURL w. rewriteTokens - acrylian - 2014-02-18

Be aware for some changes in 1.4.6 regarding some function names.