From 5716556766eb4e329f0c6c1bc899a7621cbcd5a5 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 26 Sep 2016 16:34:53 -0700 Subject: allow a site to over-ride the help table-of-contents files --- include/help.php | 5 ++++- include/widgets.php | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/help.php b/include/help.php index 5538fbc1e..3081ae41f 100644 --- a/include/help.php +++ b/include/help.php @@ -37,7 +37,10 @@ function get_help_content($tocpath = false) { $doctype = 'html'; } } - + + if(($tocpath) && (! $text)) + return ''; + if($tocpath === false) { if(! $text) { $text = load_doc_file('doc/Site.md'); diff --git a/include/widgets.php b/include/widgets.php index 9cd15dd59..2e1e58717 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1504,7 +1504,9 @@ function widget_helpindex($arr) { $o .= '
'; $o .= '

' . t('Documentation') . '

'; - $level_0 = get_help_content('toc'); + $level_0 = get_help_content('sitetoc'); + if(! $level_0) + $level_0 = get_help_content('toc'); $level_0 = preg_replace('/\/','