summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/guiconfig.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/guiconfig.inc')
-rw-r--r--src/usr/local/www/guiconfig.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index 190a662..abcf0ad 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -517,13 +517,24 @@ function gentitle($title) {
}
}
-function genhtmltitle($title, $links=array()) {
+function genhtmltitle($title, $links=true) {
+
+ $num_crumbs = count($title);
// If the array contains only one element, there are no breadcrumbs, so don't
// add anything else
- if (count($title) > 1) {
+ if ($num_crumbs > 1) {
$bc = '<ol class="breadcrumb">';
+ if (!is_array($links)) {
+ $gen_default = ($links === true);
+ $links = array_fill(0, $num_crumbs, '');
+ // If no links passed, then default to a link to self on the last entry.
+ if ($gen_default) {
+ $links[$num_crumbs-1] = '@self';
+ }
+ }
+
foreach ($title as $idx => $el) {
$href = $links[$idx];
if (strlen($href) > 0) {
OpenPOWER on IntegriCloud