## spySimplePagePlugin ### Description This plugin will help you to manage a simple content to set administrable blocks into your technical apps. ### How To Install #### Requirements * For install the plugin, you must install : 1. Symfony 1.2 2. [sfPropelActAsSluggableBehaviorPlugin](http://www.symfony-project.org/plugins/sfPropelActAsSluggableBehaviorPlugin) 3. sfThubmnailPlugin for sf1.2 with sfWidgetFormInputFileEditableThumb I hope that fabien will quickly accept my demand to load it on the repository, but you will could download the package here [http://www.spyrit.net/symfony/](http://www.spyrit.net/symfony/) #### Install Rebuild the package, and clear the cache ### How To Use For the admin you have to activate the module spySimplePageAdmin For the front, if you want to see the page not in blok like for a technical app to adminstrate on technical message you could activate spySimplePage Like that when you write the url **http://{MY_URL}/page/slug-of-the-page** you will see the content of the page ### An helper to see a content evrywhere in your others modules [php] <?php use_helper('spySimplePage'); echo spySimplePage_getIntro("MY_ALIAS"); ?> #### The functions are : * **spySimplePage_getIntro($alias,$use_contenu=true,$limite=300,$is_publish=true)** To get an intro : > * **$alias** : is the slug of your page > * **$use_contenu** : If you accept to get the content when your introdution field is empty > * **$limite** : If you have a content we truncate the content at 300 chars elseif you set 0 > * **$is_publish** : Show the article only if is it publish * **spySimplePage_getTitre($alias,$is_publish=true)** To get the title > * **$alias** : is the slug of your page > * **$is_publish** : Show the article only if is it publish * **spySimplePage_getRandomPage()** To get a random page ### To get one spySimplePage object by alias Call statically [php] $page=spySimplePagePeer::retrieveByAlias($alias,$is_publish);