- Xtemplate improvements from Ax: "i find it annoying to have two empty blocks
(a blue - message - and a grey - footer - one) if my site doesn't have neither of them set."4.3.x
parent
89005902e4
commit
1ed2329261
|
@ -108,7 +108,7 @@ img {
|
|||
}
|
||||
#footer {
|
||||
background-color: #eee;
|
||||
padding: 1em 1em 1em 1em;
|
||||
padding: 1em;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#forum td {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
// $Id$
|
||||
|
||||
function xtemplate_settings() {
|
||||
$output = form_select("Sidebar placement", "xtemplate_sidebar", variable_get("xtemplate_sidebar", "right"), array("none" => t("No sidebars"), "left" => t("Sidebar on the left"), "right" => t("Sidebar on the right"), "both" => t("Sidebar on the left and the right")));
|
||||
|
@ -89,8 +90,9 @@ class Theme_xtemplate extends BaseTheme {
|
|||
$this->template->parse("header.search_box");
|
||||
}
|
||||
|
||||
if ($_GET["q"] == variable_get("site_frontpage", "node")) {
|
||||
$this->template->assign("header_message", variable_get("xtemplate_message", l("edit message", "admin/system/themes/xtemplate")));
|
||||
// only parse the message block if we are on the frontpage ...
|
||||
if ($_GET["q"] == variable_get("site_frontpage", "node") && ($message = variable_get("xtemplate_message", "edit message"))) {
|
||||
$this->template->assign("header_message", $message);
|
||||
$this->template->parse("header.message");
|
||||
}
|
||||
|
||||
|
@ -112,8 +114,6 @@ class Theme_xtemplate extends BaseTheme {
|
|||
|
||||
$this->template->parse("header");
|
||||
print $this->template->text("header");
|
||||
|
||||
|
||||
}
|
||||
|
||||
function block($title, $content, $region = "main") {
|
||||
|
@ -155,12 +155,15 @@ class Theme_xtemplate extends BaseTheme {
|
|||
|
||||
ob_end_clean();
|
||||
|
||||
$this->template->assign( array(
|
||||
"footer_message" => variable_get("site_footer", ""),
|
||||
"footer" => theme_footer()
|
||||
));
|
||||
// only parse the footer block if site_footer is set
|
||||
if ($footer_message = variable_get("site_footer", FALSE)) {
|
||||
$this->template->assign("footer_message", $footer_message);
|
||||
$this->template->parse("footer.message");
|
||||
}
|
||||
|
||||
$this->template->assign("footer", theme_footer());
|
||||
$this->template->parse("footer");
|
||||
|
||||
print $this->template->text("footer");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,9 +98,11 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- BEGIN: message -->
|
||||
<div id="footer">
|
||||
{footer_message}
|
||||
</div>
|
||||
<!-- END: message -->
|
||||
{footer}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue