Themes Docs for documentation pages and fixed parents

This commit is contained in:
Diego Najar 2017-07-23 17:02:06 +02:00
parent cfcdbceed7
commit 560f571bc3
5 changed files with 20 additions and 13 deletions

View File

@ -88,5 +88,10 @@ $allPublishedPages = buildAllpages(true);
// Homepage select options
$homepageOptions = array();
foreach($allPublishedPages as $key=>$page) {
$homepageOptions[$key] = $page->title();
$parentKey = $page->parentKey();
if ($parentKey) {
$homepageOptions[$key] = $pagesByParentByKey[PARENT][$parentKey]->title() .'->'. $page->title();
} else {
$homepageOptions[$key] = $page->title();
}
}

View File

@ -1,2 +1,7 @@
<?php
$GITHUB_BASE_URL = 'https://github.com/dignajar/bludit-documentation-english/tree/master/';
if (!$Site->homepage()) {
echo 'This theme need a home page defined, please select one page on <b>Admin panel->Settings->Advanced->Home page</b>';
exit;
}

View File

@ -2,11 +2,6 @@
"theme-data":
{
"name": "Docs",
"description": "Docs is based on the framework Pure.css. Website: http://purecss.io",
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
"description": "Ideal theme for a site for documentation, this theme use pages and subpages for the correct display and for SEO propose. The Bludit documentation is based on this theme."
}
}

View File

@ -1,10 +1,10 @@
{
"author": "Bludit",
"email": "",
"website": "https://github.com/dignajar/bludit-themes",
"website": "http://themes.bludit.com",
"version": "1.0",
"releaseDate": "2016-01-15",
"releaseDate": "2017-07-10",
"license": "MIT",
"compatible": "1.3,1.4,1.5beta",
"compatible": "2.0",
"notes": ""
}

View File

@ -1,8 +1,10 @@
<h1 class="subhead">
<?php
$parentKey = $page->parentKey();
echo $pagesByParentByKey[PARENT][$parentKey]->title();
echo ' -> ';
if ($parentKey) {
echo $pagesByParentByKey[PARENT][$parentKey]->title();
echo ' -> ';
}
echo $page->title();
?>
</h1>