Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // PHP script
- foreach($categories as $category)
- {
- $items = $this->getItemsByCategory($category);
- $marker = array(
- '###CATEGORY_NAME###' => $category['title'],
- );
- $subpart = $this->cObj->getSubPart($template['content'], '###CATEGORY###');
- $content .= $this->cObj->substituteMarkerArrayCached($subpart, $marker);
- foreach($items as $item)
- {
- $marker_items = array(
- '###CATEGORY_ITEM_NAME###' => $item['title']
- );
- $subpart2 = $this->cObj->getSubPart($subpart, '###CATEGORY_ITEMS###');
- $content .= $this->cObj->substituteMarkerArrayCached($subpart2, $marker_items);
- }
- }
- ?>
- <!-- Template -->
- <!-- ###CATEGORY### begin -->
- <li>###CATEGORY_NAME###
- <ul>
- <!-- ###CATEGORY_ITEMS### begin -->
- <li>###CATEGORY_ITEM_NAME###</li>
- <!-- ###CATEGORY_ITEMS### end -->
- </ul>
- </li>
- <!-- ###CATEGORY### end -->
Add Comment
Please, Sign In to add comment