本文整理汇总了PHP中PageModel::GetFullID方法的典型用法代码示例。如果您正苦于以下问题:PHP PageModel::GetFullID方法的具体用法?PHP PageModel::GetFullID怎么用?PHP PageModel::GetFullID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageModel
的用法示例。
在下文中一共展示了PageModel::GetFullID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Page
public function Page($Reference)
{
$PageModel = new PageModel();
$Page = $PageModel->GetFullID($Reference);
if (!$Page) {
throw NotFoundException();
}
$this->Page = $Page;
if ($this->Head) {
SetMetaTags($Page, $this);
if ($Page->CustomCss) {
$CustomCss = "\n" . $Page->CustomCss;
if (!StringBeginsWith(trim($CustomCss), '<style', True)) {
$CustomCss = Wrap($CustomCss, 'style', array('type' => 'text/css'));
}
$this->Head->AddString($CustomCss);
}
if ($Page->CustomJs) {
$CustomJs = $Page->CustomJs;
if (!StringBeginsWith(trim($CustomJs), '<script', True)) {
$CustomJs = Wrap($CustomJs, 'script', array('type' => 'text/javascript'));
}
$this->Head->AddString($CustomJs);
}
}
if ($Page->SectionID) {
$this->Section = BuildNode($Page, 'Section');
$this->SectionID = $Page->SectionID;
CandyHooks::AddModules($this, $this->Section);
}
$this->FireEvent('ContentPage');
if ($Page->View) {
$this->View = $this->FetchViewLocation($this->View, False, False, False);
}
if (!$this->View) {
$this->View = $this->FetchViewLocation('view', 'page', '', False);
if (!$this->View) {
$this->View = 'default';
}
}
$this->Title($Page->Title);
$this->SetData('Content', $Page, True);
$this->EventArguments['Format'] =& $Page->Format;
$this->EventArguments['Body'] =& $Page->Body;
$this->FireEvent('BeforeBodyFormat');
$this->ContentBodyHtml = Gdn_Format::To($Page->Body, $Page->Format);
$Doc = PqDocument($this->ContentBodyHtml);
$Header = $Doc->Find('h1');
$CountH1 = count($Header);
if ($CountH1 == 0) {
$this->SetData('Headline', Gdn_Format::Text($Page->Title));
} elseif ($CountH1 == 1) {
$this->SetData('Headline', $Header->Text());
$Header->Remove();
$this->ContentBodyHtml = $Doc->Html();
}
//
$this->AddModule('PageInfoModule');
$this->Render();
}