Hi Ross,
The one record being worked on. We have no need for the "list" view preview (each record is an individual website page).
The "controller" page is called "/pages.php" and that was entered as the value for List Page, Detail Page, and Preview Page. (otherwise Permalinks plugin alert error to ensure admin user put a value in for each)
We use this one getCategories call:
// load records from 'site_pages'
list($site_pagesRecords, $selectedSite_pages) = getCategories(array(
'tableName' => 'site_pages',
'categoryFormat' => 'showall',
'defaultCategory' => '',
'rootCategoryNum' => '',
'ulAttributes' => '',
'selectedCategoryNum' => '',
'ulAttributesCallback' => 'customMenuUlAttr',
'liAttributesCallback' => 'customMenuLiAttr',
'loadCreatedBy' => false,
'loadUploads' => true,
'ignoreHidden' => false,
'debugSql' => false,
));
We then create the navigation menu based on this. The website page content is rendered according to "selected category" record.
Base example for page output:
<?php if (!$selectedSite_pages): ?>
<h1>Page Not Found</h1>
<p>Oops! The requested page could not be found!</p>
<?php endif ?>
<?php if ($selectedSite_pages): ?>
<h1><?php echo htmlencode($selectedSite_pages['name']) ?></h1>
<?php echo $selectedSite_pages['content']; ?>
<?php endif ?>
When clicking the "preview" button while doing "modify" a single record it triggers "if no selected pages".
Thank you,
Steve