Commit 7bf8dae989c062c6648a42d5b2dfb5f9c4a63827

Authored by michael
1 parent 44843846

added optional sectionName to renderHeading


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1957 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 4 additions and 2 deletions
presentation/Html.inc
@@ -11,9 +11,11 @@ @@ -11,9 +11,11 @@
11 * @package presentation 11 * @package presentation
12 */ 12 */
13 13
14 -function renderHeading($sHeading) { 14 +function renderHeading($sHeading, $sSectionName = "") {
15 global $default; 15 global $default;
16 - $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); 16 + if (strlen($sSectionName) == 0) {
  17 + $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"])));
  18 + }
17 $sColor = $default->siteMap->getSectionColour($sSectionName, "th"); 19 $sColor = $default->siteMap->getSectionColour($sSectionName, "th");
18 $sToRender = "<table border=\"0\" width=\"100%\">\n"; 20 $sToRender = "<table border=\"0\" width=\"100%\">\n";
19 $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\"><font color=\"ffffff\">$sHeading</font></th></tr>\n"; 21 $sToRender .= "<tr align=\"left\"><th class=\"sectionHeading\" bgcolor=\"$sColor\"><font color=\"ffffff\">$sHeading</font></th></tr>\n";