/**
* Tabbed content template for the Unraid web interface.
* Accessible, modern, and decoupled from non-tabbed logic.
*/
?>
$i = 0;
$skipIndexIncrement = false; // used if the page has no title but has text
?>
foreach ($pages as $page): ?>
if (!isset($page['Title'])) {
/**
* If the page has no title but has text, we need to eval the content to ensure the page is "rendered".
* For instance Share.page is a parent page that has no title but has text aka content.
* The content consists of some PHP and JS code that needs to be evaluated to ensure it's rendered.
* We'll use the $skipIndexIncrement to skip the index increment. To ensure the tabs are properly rendered.
*/
if (isset($page['text'])) {
$skipIndexIncrement = true;
annotate($page['file']);
eval('?>'.generateContent($page));
}
continue;
}
$title = processTitle($page['Title']);
$tabId = "tab" . ($i+1);
annotate($page['file']);
?>
= generatePanels($page, $path, $defaultIcon, $docroot) ?>
eval('?>'.generateContent($page)); ?>
if ($skipIndexIncrement) {
$skipIndexIncrement = false;
} else {
$i++;
}
?>
endforeach; ?>