Guest User

Untitled

a guest
Jul 17th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?php
  2. // PHP script
  3. foreach($categories as $category)
  4. {
  5. $items = $this->getItemsByCategory($category);
  6.  
  7. $marker = array(
  8. '###CATEGORY_NAME###' => $category['title'],
  9. );
  10.  
  11. $subpart = $this->cObj->getSubPart($template['content'], '###CATEGORY###');
  12. $content .= $this->cObj->substituteMarkerArrayCached($subpart, $marker);
  13.  
  14. foreach($items as $item)
  15. {
  16. $marker_items = array(
  17. '###CATEGORY_ITEM_NAME###' => $item['title']
  18. );
  19.  
  20. $subpart2 = $this->cObj->getSubPart($subpart, '###CATEGORY_ITEMS###');
  21. $content .= $this->cObj->substituteMarkerArrayCached($subpart2, $marker_items);
  22. }
  23. }
  24. ?>
  25.  
  26. <!-- Template -->
  27. <!-- ###CATEGORY### begin -->
  28. <li>###CATEGORY_NAME###
  29. <ul>
  30. <!-- ###CATEGORY_ITEMS### begin -->
  31. <li>###CATEGORY_ITEM_NAME###</li>
  32. <!-- ###CATEGORY_ITEMS### end -->
  33. </ul>
  34. </li>
  35. <!-- ###CATEGORY### end -->
Add Comment
Please, Sign In to add comment