Error

No page ID was supplied.itemExists($Id)) { # display error message indicating page not found ?>

Error

No page found with specified ID. userCanView($User)) { # display unauthorized access message PageTitle("Unauthorized Access"); ?>

Unauthorized Access

You do not have the permissions required to view this page.

get("Title")); # display edit and delete buttons if appropriate if ($Page->userCanEdit($User)) { $Editor = new \Metavus\InlineEditingUI( "index.php?P=P_Pages_InlineEdit&ID=".$Id ); $RestingControls = [ ".cw-pages-controls.cw-pages-delete", ".cw-pages-controls.cw-folders-addresource", ]; $EditingControls = [ ".cw-pages-controls.cw-pages-edit", ]; $Editor->onDiscardShowSelectors($RestingControls); $Editor->onCancelShowSelectors($RestingControls); $Editor->onSaveShowSelectors($RestingControls); $Editor->onEditShowSelectors($EditingControls); print ''; ?> gUIFile("cross.png") ?>"> Delete gUIFile("pencil.png") ?>">Full Editor signalEvent( "EVENT_HTML_INSERTION_POINT", [ $GLOBALS["AF"]->getPageName(), "Resource Display Buttons", ["Resource" => $Page] ] ); ?> getEditingControlsHtml(); } # add meta tag for page description $Plugin = $GLOBALS["G_PluginManager"]->getPluginForCurrentPage(); $Summary = $Page->get("Summary"); if ($Summary !== null) { $Summary = $GLOBALS["AF"]->escapeInsertionKeywords( $Summary, $Plugin->getAllowedInsertionKeywords() ); $GLOBALS["AF"]->addMetaTag([ "name" => "description", "content" => $Summary, ]); } # retrieve page content $PageContent = $Page->get("Content"); if ($PageContent === null) { $PageContent = ""; } # keep a copy of the unmodified version $SourceData = $PageContent; # if page contains tabs if ($Page->containsTabs()) { # make sure JavaScript and CSS files needed for tabs are loaded $GLOBALS["AF"]->requireUIFile('jquery-ui.js'); $GLOBALS["AF"]->requireUIFile('jquery-ui.css', ApplicationFramework::ORDER_FIRST); # add in tab markup $PageContent = Page::processTabMarkup($PageContent); } # make sure only allowed insertion keywords are expanded $PageContent = $GLOBALS["AF"]->escapeInsertionKeywords( $PageContent, $Plugin->getAllowedInsertionKeywords() ); # ensure all tags in the content are closed $PageContent = StdLib::closeOpenTags($PageContent); # signal view of page $GLOBALS["AF"]->signalEvent( "EVENT_FULL_RECORD_VIEW", ["ResourceId" => $Page->id()] ); # display the page $GLOBALS["AF"]->requireUIFile('Pages_Controls.css'); print "{{PAGES-BEFORECONTENT}}"; print "
 
"; print "
"; if ($Page->userCanEdit($User)) { $Editor->htmlToDisplay($PageContent); $Editor->sourceData($SourceData); $Editor->display(); } else { print $PageContent; } print "
"; print "
 
"; # add editing information if appropriate if ($Page->userCanEdit($User)) { $MDate = $Page->get("Date Last Modified"); $MUser = $Page->get("Last Modified By Id", true); $MUser = array_shift($MUser); $MUserName = ($MUser instanceof User) ? $MUser->name() : "(unknown)"; $EditInfo = "Last modified by " ."".$MUserName."" ." ".StdLib::getPrettyTimestamp($MDate, true).""; ?>