/** * Returns page extra content either of the current page or if requested by titlelink directly. If not both return false * Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example * * @param string $titlelink the titlelink of the page to print the content from * @param bool $published If titlelink is set, set this to false if you want to call an un-published page's extra content. True is default * @return mixed */ function getPageExtraContent($titlelink = '', $published = true) { global $_zp_current_zenpage_page; if (is_Pages() and empty($titlelink)) { return $_zp_current_zenpage_page->getExtracontent(); } // print content of a page directly on a normal zenphoto theme page for example if (!empty($titlelink)) { $page = new ZenpagePage($titlelink); if ($page->getShow() or !$page->getShow() and !$published) { return $page->getExtracontent(); } } return false; }
<br class="clearall" /> </div> <?php } else { echo gettext('No unpublished articles'); } ?> </fieldset> <?php $visible = $report == 'pages'; $items = $_zp_zenpage->getPages(false); $output = ''; $c = 0; foreach ($items as $key => $item) { $itemobj = new ZenpagePage($item['titlelink']); if (!$itemobj->getShow()) { $c++; $output .= '<li><label><input type="checkbox" name="' . $item['titlelink'] . '" value="' . $item['titlelink'] . '" class="pagecheck" />' . $itemobj->getTitle() . '</label><a href="' . html_encode($itemobj->getLink()) . '" title="' . html_encode($itemobj->getTitle()) . '"> (' . gettext('View') . ')</a></li>'; } } ?> <br class="clearall" /> <fieldset class="smallbox"> <legend><?php reveal('pagebox', $visible); echo gettext('Pages not published'); ?> </legend> <?php if ($report == 'pages') { ?>