/**
 * 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;
}