spySimplePagePlugin
0.1.0beta
for sf 1.2 MIT
We frequently need to set a little parts of CMS into our application.
This plugins with it helper allow you to set pages content like that spySimplePage_getIntro('alias-of-the-page');
Developers
License
MIT http://www.symfony-project.com/license
(c) Cédric Lombardot <cedric.lombardot <<at>> spyrit.net> http://lombardot.fr
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Releases for sf 1.2
| Version |
License |
API |
Released |
|
0.1.0beta
|
MIT |
0.1.0beta
|
27/01/2009 |
| Name |
Channel |
Version |
| sfPropelActAsSluggableBehaviorPlugin |
plugins.symfony-project.com |
0.2.0- |
| sfThumbnailPlugin |
plugins.symfony-project.com |
1.5.1- |
Changelog for release 0.1.0 - 27/01/2009
Other releases
Release 0.1.0 - 27/01/2009
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 :
- Symfony 1.2
- sfPropelActAsSluggableBehaviorPlugin
- 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/
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
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
$page=spySimplePagePeer::retrieveByAlias($alias,$is_publish);