<th scope="col" class="center" style="width: 40px;">Delete</th> </tr> </thead> <tbody> <?php foreach ($items as $item) { ?> <?php $item = (object) $item; // Start - Create dash to indicate a sub page $dash = ''; $count = 0; $page = \Page\Model_Page::find_one_by_id($item->id); while ($page->parent_id != 0) { $page = \Page\Model_Page::find_one_by_id($page->parent_id); $count++; } while ($count != 0) { $dash .= '- '; $count--; } // End - Create dash to indicate a sub page ?> <tr id="sort_<?php echo $item->id . '_' . $item->sort; ?> "> <td> <?php echo $dash;
/** * Return gallery images for gallery popup * Only use in ajax calls * * @param type $gallery_id */ private function returnGalleryImages($gallery_id) { $gallery = \Page\Model_Page::find_one_by_id($gallery_id); if ($gallery) { echo \Theme::instance()->view($this->view_dir . 'gallery_images')->set('images', $gallery->accordions, false); } else { echo 'Gallery does not exist!! Plese try again.'; } exit; }