printSlideShow prevents content from showing

I am creating a custom homepage with a slideshow on top and content (website presentation) below.

When I place printSlideShow before printPageContent, the page content does not show.
When I place printPageContent before printSlideShow, the content appears normally.

Here is the code I use
<?php
$albumobj = new Album( $_zp_gallery, "top.alb");
printSlideShow(false,false,$albumobj," ", "640","427");
?>

and
<?php printPageContent(); ?>

Comments

  • acrylian Administrator, Developer
    Any errors? Is it really not showing or maybe just overlapped display in whatever theme your are using?
  • The area where the content is supposed to appear is entirely blank.

    No error.

    If I place the Slideshow code in a codeblock in a Zenpage, I do get an error:
    Notice: Bad gallery in instantiation of album top.alb. in D:\wwwroot\fep\zp-core\class-album.php on line 48
  • acrylian Administrator, Developer
    Yes, within the codeblox the $_zp_gallery global is not set/available as it is a call within a function.

    You did correctly add the needed js files to the page's ``? Except for the slideshow.php page you need to do that manually.

    I will have to try that later myself as that generally should work.
  • acrylian Administrator, Developer
    Finally I did get to try this. The reason is that the slideshow changes the context so the page does not work. So after the slideshow call you need to do `set_context(ZP_ZENPAGE_PAGE);` to restore the page context.
Sign In or Register to comment.