Themes Docs for documentation pages and fixed parents
This commit is contained in:
parent
cfcdbceed7
commit
560f571bc3
|
@ -88,5 +88,10 @@ $allPublishedPages = buildAllpages(true);
|
||||||
// Homepage select options
|
// Homepage select options
|
||||||
$homepageOptions = array();
|
$homepageOptions = array();
|
||||||
foreach($allPublishedPages as $key=>$page) {
|
foreach($allPublishedPages as $key=>$page) {
|
||||||
|
$parentKey = $page->parentKey();
|
||||||
|
if ($parentKey) {
|
||||||
|
$homepageOptions[$key] = $pagesByParentByKey[PARENT][$parentKey]->title() .'->'. $page->title();
|
||||||
|
} else {
|
||||||
$homepageOptions[$key] = $page->title();
|
$homepageOptions[$key] = $page->title();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,2 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
$GITHUB_BASE_URL = 'https://github.com/dignajar/bludit-documentation-english/tree/master/';
|
$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;
|
||||||
|
}
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
"theme-data":
|
"theme-data":
|
||||||
{
|
{
|
||||||
"name": "Docs",
|
"name": "Docs",
|
||||||
"description": "Docs is based on the framework Pure.css. Website: http://purecss.io",
|
"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."
|
||||||
"author": "Bludit",
|
|
||||||
"email": "",
|
|
||||||
"website": "http://www.bludit.com",
|
|
||||||
"version": "0.1",
|
|
||||||
"releaseDate": "2015-08-02"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://github.com/dignajar/bludit-themes",
|
"website": "http://themes.bludit.com",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"releaseDate": "2016-01-15",
|
"releaseDate": "2017-07-10",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "1.3,1.4,1.5beta",
|
"compatible": "2.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<h1 class="subhead">
|
<h1 class="subhead">
|
||||||
<?php
|
<?php
|
||||||
$parentKey = $page->parentKey();
|
$parentKey = $page->parentKey();
|
||||||
|
if ($parentKey) {
|
||||||
echo $pagesByParentByKey[PARENT][$parentKey]->title();
|
echo $pagesByParentByKey[PARENT][$parentKey]->title();
|
||||||
echo ' -> ';
|
echo ' -> ';
|
||||||
|
}
|
||||||
echo $page->title();
|
echo $page->title();
|
||||||
?>
|
?>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
Loading…
Reference in New Issue