Making zenpage content load on non zenphoto pages

Hi guys,

I am using zenphoto 1.2.3 and zenpage 1.1
Everthing works fine with the site.
Easily the best gallery system I have used.

I would like however to be able to load a page of zenpage content on a regular html/php page outside of the root of the zenphoto section of my site

So far I have `printPageTitle();` where the title will go and `printPageContent();` and
`printCodeblock(1);` where the content will go.

Obviously I need to now require/include some zenpage functions and pass some variable to the functions between the brackets of `printPageTitle();` and `printPageContent();` to get it to work.

Can anyone please give me some pointers?

Comments

  • acrylian Administrator, Developer
    You can't pass variables to those function to do that (did you look at the documentation?). May I ask why you need to show that outside of Zenphoto?

    Anyway, first you should upgrade to Zenphoto 1.2.5 as the internal setup has changed regarding Zenpage since it became an official plugin with 1.2.4 that makes things like this much easier. Therefore this will be for 1.2.5 and its included Zenpage 1.1.1 (its actually 1.1.2 but we forgo to raise the version number...). You can use the method described here:
    http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin

    Additionally you need to include the four Zenpage main files like template-functions.php in the example:
    `plugins/zenpage/zenpage-class-news.php` (you can leave that if you don't need news)
    `plugins/zenpage/zenpage-class-page.php`
    `plugins/zenpage/zenpage-functions.php`
    `plugins/zenpage/zenpage-template-functions.php`

    Then you need to setup a page object and use the ZenpagePage methodes to get the data like this:
    `
    $pageobject = new ZenpagePage("");
    $pagetitle = $pageobject->getTitle();
    $pagecontent = $pageobject->getContent();
    `
    More info and details about available methods on the documentation.
Sign In or Register to comment.