mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
Render Phame templates in the expected order
Summary: Currently, content runs before header. Instead, run header, content, footer. This makes it easier to use `header.php` for includes, for Phacility. Test Plan: Made Phacility blog work better, see next diff. Reviewers: chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D10067
This commit is contained in:
parent
a6698f2ea5
commit
f9fe5e3a60
1 changed files with 7 additions and 2 deletions
|
@ -41,16 +41,21 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
|
||||||
$this->cssResources = phutil_implode_html("\n", $this->cssResources);
|
$this->cssResources = phutil_implode_html("\n", $this->cssResources);
|
||||||
|
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
|
|
||||||
|
// Render page parts in order so the templates execute in order, if we're
|
||||||
|
// using templates.
|
||||||
|
$header = $this->renderHeader();
|
||||||
$content = $this->renderContent($request);
|
$content = $this->renderContent($request);
|
||||||
|
$footer = $this->renderFooter();
|
||||||
|
|
||||||
if (!$content) {
|
if (!$content) {
|
||||||
$content = $this->render404Page();
|
$content = $this->render404Page();
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = array(
|
$content = array(
|
||||||
$this->renderHeader(),
|
$header,
|
||||||
$content,
|
$content,
|
||||||
$this->renderFooter(),
|
$footer,
|
||||||
);
|
);
|
||||||
|
|
||||||
$response = new AphrontWebpageResponse();
|
$response = new AphrontWebpageResponse();
|
||||||
|
|
Loading…
Reference in a new issue