Display the sidebar on all pages, not just albums and photos.
This commit is contained in:
parent
035cf12fea
commit
bc6de82a78
@ -25,24 +25,27 @@ class latestupdates_block_Core {
|
|||||||
static function get($block_id, $theme) {
|
static function get($block_id, $theme) {
|
||||||
$block = "";
|
$block = "";
|
||||||
|
|
||||||
if (!$theme->item()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($block_id) {
|
switch ($block_id) {
|
||||||
case "latestupdates":
|
case "latestupdates":
|
||||||
// Determine the ID# of the current album.
|
|
||||||
$albumID = $theme->item->is_album() ? $theme->item->id : $theme->item->parent_id;
|
|
||||||
|
|
||||||
// Make a new sidebar block.
|
// Make a new sidebar block.
|
||||||
$block = new Block();
|
$block = new Block();
|
||||||
$block->css_id = "g-latest-updates";
|
$block->css_id = "g-latest-updates";
|
||||||
$block->title = t("Latest Updates");
|
$block->title = t("Latest Updates");
|
||||||
$block->content = new View("latestupdates_block.html");
|
$block->content = new View("latestupdates_block.html");
|
||||||
$block->content->update_links = array(
|
|
||||||
"Entire Gallery" => url::site("latestupdates/updates"),
|
if (!$theme->item()) {
|
||||||
"This Album" => url::site("latestupdates/albums/$albumID")
|
$block->content->update_links = array(
|
||||||
);
|
"Entire Gallery" => url::site("latestupdates/updates"));
|
||||||
|
} else {
|
||||||
|
// Determine the ID# of the current album.
|
||||||
|
$albumID = $theme->item->is_album() ? $theme->item->id : $theme->item->parent_id;
|
||||||
|
$block->content->update_links = array(
|
||||||
|
"Entire Gallery" => url::site("latestupdates/updates"),
|
||||||
|
"This Album" => url::site("latestupdates/albums/$albumID")
|
||||||
|
);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $block;
|
return $block;
|
||||||
|
Reference in New Issue
Block a user