• All Elements
Packages
  • [Backend]
  • [Implementation]
  • [Implementation]-[Backend]
  • [Plugins]
[Implementation]


  • Package Elements
  • Class Hierarchy

Quick Menu
  • Description

feindura - Docs

  • Back to feindura.org
  • Startpage
  • Feindura Class
Welcome
Documentation
CHANGELOG | LICENSE

See the example of the createSubMenuOfPage() method


Show Example
  1. <?php
  2. /*                               *** CODE ***
  3. --------------------------------------------------------------------------------
  4. This example uses no extra properties. To see an example using all the properties, see the createMenu() method example.
  5. */
  6.  
  7. // a session will be started in the "feindura.include.php",
  8. // therefor you have to include this file before the header of the HTML page is sent,
  9. // which means before any HTML Tag.
  10. require('cms/feindura.include.php');
  11.  
  12. // creates a new Feindura instance
  13. $feindura = new Feindura();
  14.  
  15. ?>
  16. <!DOCTYPE html>
  17. <html>
  18. ...
  19.  
  20. <?php
  21.  
  22.  
  23. // will create a <ul> menu from the current page, when it has a subcategory or the current subcategory
  24. foreach($feindura->createSubMenu('ul') as $item) {
  25.   echo $item['menuItem'];
  26. }
  27.  
  28.  
  29.                                *** RESULT ***
  30. --------------------------------------------------------------------------------
  31.  
  32. <ul>
  33.   <li>
  34.     <a href="?category=1&page=1" title="Example Page 1">
  35.     Example Page 1
  36.     </a>
  37.  
  38.     <ul>
  39.       <li>
  40.         <a href="?category=2&page=4" title="Example Page in SubCategory 1">
  41.         Example Page in SubCategory 1
  42.         </a>
  43.       </li>
  44.       <li>
  45.         <a href="?category=2&page=5" title="Example Page in SubCategory 2">
  46.         Example Page in SubCategory 2
  47.         </a>
  48.       </li>
  49.     </ul>
  50.  
  51.   </li>
  52.   <li>
  53.     <a href="?category=1&page=2" title="Example Page 2">
  54.     Example Page 2
  55.     </a>
  56.   </li>
  57.   <li>
  58.     <a href="?category=1&page=3" title="Example Page 3">
  59.     Example Page 3
  60.     </a>
  61.   </li>
  62. </ul>
  63.  
  64. ?>


The feindura API reference was generated from the comments in the feindura source code on Sat, 01 Dec 2012 21:55:38 +0000 by phpDocumentor 1.4.3
feindura - Flat File Content Management System, Copyright © Fabian Vogelsteller [frozeman.de]