• 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

the called showPage method in this example uses the generatePage() method


Show Example
  1. <?php
  2. /*                               *** SIMPLE EXAMPLE *** 
  3. -------------------------------------------------------------------------------- */
  4.  
  5. // add before any HTML Tag. (eg. before the <!doctype html>)
  6. require('cms/feindura.include.php');
  7.  
  8. // creates a new Feindura instance
  9. $feindura = new Feindura();
  10.  
  11. ?>
  12. <!DOCTYPE html>
  13. <html>
  14. ...
  15.  
  16. <?php
  17.  
  18. // get the page, which is currently selected, if not page is selected it uses the $feindura->startPage property
  19. $currentPage = $feindura->showPage();
  20.  
  21. // displays the page
  22. echo '<h1>'.$page['title'].'</h1>';
  23. echo $page['content'];
  24.  
  25.  
  26.                                *** RESULT *** 
  27. --------------------------------------------------------------------------------
  28.  
  29. <h1>Example Page 1</h1>
  30.  
  31. <p>Lorem ipsum dolor sit amet, consetetur sadipscing dolores et ea rebum.
  32. Stet clita kasd gubergren, no sea takimata sanctus.</p>
  33.  
  34.  
  35. /*                               *** EXTENDED EXAMPLE *** 
  36. --------------------------------------------------------------------------------
  37. This example uses all possible properties.
  38. It's also works much more simple: just call showPage() without setting properties
  39. and it shows the current page given by the $_GET variable.
  40. */
  41.  
  42. // add before any HTML Tag. (eg. before the <!doctype html>)
  43. require('cms/feindura.include.php');
  44.  
  45. // creates a new Feindura instance
  46. $feindura = new Feindura();
  47.  
  48. // set properties
  49. $feindura->xHtml =                  true;
  50.  
  51. $feindura->titleLength =            20;
  52. $feindura->titleAsLink =            true;
  53. $feindura->titleShowPageDate =      true;
  54. $feindura->titlePageDateSeparator = ' - ';
  55. $feindura->titleShowCategory =      false; // would have no effect, because page with ID "1" has no category
  56. $feindura->titleCategorySeparator = ' -> '; // would have no effect, because $titleShowCategory = FALSE
  57.  
  58. $feindura->thumbnailAlign =         'left';
  59. $feindura->thumbnailId =            'thumbId';
  60. $feindura->thumbnailClass =         'thumbCLass';
  61. $feindura->thumbnailAttributes =    'test="exampleAttribute1" onclick="exampleAttribute2"';
  62. $feindura->thumbnailBefore =        false;
  63. $feindura->thumbnailAfter =         false;
  64.  
  65. $feindura->showErrors =              true;
  66. $feindura->errorTag =               'div.alertClass';
  67.  
  68.  
  69. // finally, get the page, with ID "1", using the above set properties
  70. $page = $feindura->showPage(1);
  71.  
  72. // displays the page (the "\n" creates a line break for a better look)
  73. echo $page['title'];
  74. echo $page['thumbnail'];
  75. echo $page['content'];
  76.  
  77.  
  78.                                *** RESULT *** 
  79. --------------------------------------------------------------------------------
  80.  
  81. <a href="?page=1" title="2010-12-31 - Example Page">
  82. 2010-12-31 - Example...
  83. </a>
  84. <img src="/path/thumb_page3.png" class="feinduraThumbnail" alt="Thumbnail" title="Example Page 1" id="thumbId"
  85. class="thumbCLass" test="exampleAttribute1" onclick="exampleAttribute2" style="float:left;">
  86.  
  87. <h2>Example Headline</h2>
  88. <p>Lorem ipsum dolor sit amet, consetetur sadipscing dolores et ea rebum.
  89. Stet clita kasd gubergren, no sea takimata sanctus.</p>
  90. <p>Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
  91. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam...</p>
  92.  
  93.  
  94.                           *** RESULT with error *** 
  95. --------------------------------------------------------------------------------
  96.  
  97.  
  98. <div class="alertClass">
  99. The requested page is deactivated.
  100. </div>
  101.  
  102. ?>


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