Set default home page
This commit is contained in:
parent
435f658ef7
commit
bce32b615e
@ -51,3 +51,22 @@ if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
// ============================================================================
|
||||
// Main
|
||||
// ============================================================================
|
||||
|
||||
// Default home page
|
||||
$_homePageList = array(''=>$Language->g('Show blog'));
|
||||
foreach($pagesParents as $parentKey=>$pageList)
|
||||
{
|
||||
foreach($pageList as $Page)
|
||||
{
|
||||
if($parentKey!==NO_PARENT_CHAR) {
|
||||
$parentTitle = $pages[$Page->parentKey()]->title().'->';
|
||||
}
|
||||
else {
|
||||
$parentTitle = '';
|
||||
}
|
||||
|
||||
if($Page->published()) {
|
||||
$_homePageList[$Page->key()] = $Language->g('Page').': '.$parentTitle.$Page->title();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +63,18 @@
|
||||
<div class="forms-desc"><?php $Language->p('number-of-posts-to-show-per-page') ?></div>
|
||||
</label>
|
||||
|
||||
<label for="homepage">
|
||||
<?php $Language->p('Default home page') ?>
|
||||
<select name="homepage" class="width-50">
|
||||
<?php
|
||||
$htmlOptions = $_homePageList;
|
||||
foreach($htmlOptions as $value=>$text) {
|
||||
echo '<option value="'.$value.'"'.( ($Site->homepage()===$value)?' selected="selected"':'').'>'.$text.'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<?php $Language->p('Site URL') ?>
|
||||
<input type="text" name="url" class="width-50" value="<?php echo $Site->url() ?>">
|
||||
|
@ -126,5 +126,7 @@
|
||||
"delete": "Delete",
|
||||
"delete-the-user-and-all-its-posts":"Delete the user and all its posts",
|
||||
"delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user",
|
||||
"read-more": "Read more"
|
||||
"read-more": "Read more",
|
||||
"show-blog": "Show blog",
|
||||
"default-home-page": "Default home page"
|
||||
}
|
Loading…
Reference in New Issue
Block a user