Changeset 18445
- Timestamp:
- 05/19/09 09:49:47 (4 years ago)
- Files:
-
- plugins/isicsBreadcrumbsPlugin/README (modified) (2 diffs)
- plugins/isicsBreadcrumbsPlugin/package.xml (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/isicsBreadcrumbsPlugin/README
r15203 r18445 1 = isicsBreadcrumbsPlugin plugin = 1 # isicsBreadcrumbsPlugin plugin 2 2 3 3 The isicsBreadcrumbsPlugin is a simple way to handle breadcrumbs in your applications. … … 5 5 isicsBreadcrumbsPlugin is working on Symfony 1.1 or greater. 6 6 7 == At a glance == 8 * A singleton who manages breadcrumbsItems. By default, a root item is present (text: Home, uri: @homepage)9 * A component who display the breadcrumbs7 ## At a glance 8 * A singleton who manages breadcrumbsItems. By default, a root item is present (text: Home, uri: @homepage) 9 * A component who display the breadcrumbs 10 10 11 == License == 11 ## License 12 12 13 13 The isicsBreadcrumbsPlugin is licensed under the GNU Lesser General Public License (LGPL). 14 14 15 == Installation == 15 ## Installation 16 16 17 * Install the plugin: 17 * Install the plugin: 18 19 [plain] 20 $ symfony plugin:install isicsBreadcrumbsPlugin 21 $ symfony cc 18 22 19 {{{ 20 $ symfony plugin-install http://plugins.symfony-project.com/isicsBreadcrumbsPlugin 21 $ symfony cc 22 }}} 23 * Enable the module isicsBreadcrumbs in settings.yml: 23 24 24 * Enable the module isicsBreadcrumbs in settings.yml: 25 [plain] 26 all: 27 .settings: 28 enabled_modules: [default, isicsBreadcrumbsPlugin] 25 29 26 {{{ 27 all: 28 .settings: 29 enabled_modules: [default, isicsBreadcrumbsPlugin] 30 }}} 31 32 == Usage == 30 ## Usage 33 31 34 32 Define the path in your templates: 35 {{{36 #!php37 <?php breadcrumbs->addItem('My action', 'myModule/myAction') ?>38 33 39 => Home > My action 40 }}} 34 [php] 35 <?php $breadcrumbs->addItem('My action', 'myModule/myAction') ?> 36 37 => Home > My action 41 38 42 39 If the action is deeper: 43 {{{ 44 #!php 45 <?phpbreadcrumbs->addItem('My previous action', 'myModule/myPreviousAction') ?>46 <?phpbreadcrumbs->addItem('My action', 'myModule/myAction') ?>40 41 [php] 42 <?php $breadcrumbs->addItem('My previous action', 'myModule/myPreviousAction') ?> 43 <?php $breadcrumbs->addItem('My action', 'myModule/myAction') ?> 47 44 48 => Home > My previous action > My action 49 }}} 45 => Home > My previous action > My action 50 46 51 47 Define the path in your actions: 52 {{{53 #!php54 public function executeMyAction()55 {56 isicsBreadcrumbs::getInstance()->addItem('My action', 'myModule/myAction');57 48 58 => Home > My action 59 }}} 49 [php] 50 public function executeMyAction() 51 { 52 isicsBreadcrumbs::getInstance()->addItem('My action', 'myModule/myAction'); 53 54 => Home > My action 60 55 61 56 Include the breadcrumbs component (in the layout for instance): 62 {{{ 63 #!php 64 <p id="breadcrumbs"> 65 You are here : 66 <?php include_component('isicsBreadcrumbs', 'show') ?> 67 </p> 68 }}} 57 58 [php] 59 <p id="breadcrumbs"> 60 You are here : 61 <?php include_component('isicsBreadcrumbs', 'show') ?> 62 </p> 69 63 70 64 You can set your own root: 71 {{{72 #!php73 <p id="breadcrumbs">74 You are here :75 <?php include_component('isicsBreadcrumbs', 'show', array(76 'root' => array('text' => 'Home', 'uri' => '@myHomepage'))) ?>77 </p>78 }}}79 65 80 === API === 81 * `void addItem(String $test, String $uri)`: add an item at the end of the breadcrumbs 82 * `void clearItems()`: erase all items 83 * `isicsBreadcrumbs getInstance()`: retrieve the singleton instance 84 * `array getItems()`: return an array of isicsBreadcrumbsItem 85 * `void setRoot(String $test, String $uri)`: set root item. By default, a root item is already present (text: Home, uri: @homepage). 66 [php] 67 <p id="breadcrumbs"> 68 You are here : 69 <?php include_component('isicsBreadcrumbs', 'show', array( 70 'root' => array('text' => 'Home', 'uri' => '@myHomepage') 71 )) ?> 72 </p> 73 74 ## API 75 * `void addItem(String $test, String $uri)`: add an item at the end of the breadcrumbs 76 * `void clearItems()`: erase all items 77 * `isicsBreadcrumbs getInstance()`: retrieve the singleton instance 78 * `array getItems()`: return an array of isicsBreadcrumbsItem 79 * `void setRoot(String $test, String $uri)`: set root item. By default, a root item is already present (text: Home, uri: @homepage). 86 80 87 == Changelog == 81 ## Changelog 88 82 89 === 2009-02-02 | 0.9.2 beta === 90 * Added `breadcrumbs` template shorcut (break compatibility with sf 1.0). 91 * Added output escaping support. 92 * Removed I18N support (hasn't to be handled here). 83 ### 2009-05-19 | 0.9.4 beta 84 * Fixed package.xml 85 * Updated README to markdown 93 86 94 === 2008-07-29 | 0.9.1 beta === 95 * Added action caching support. 87 ### 2009-02-02 | 0.9.2 beta 88 * Added `breadcrumbs` template shorcut (break compatibility with sf 1.0). 89 * Added output escaping support. 90 * Removed I18N support (hasn't to be handled here). 91 92 ### 2008-07-29 | 0.9.1 beta 93 * Added action caching support. 96 94 97 === 2008-06-23 | 0.9.0 beta === 98 * Initial public release.95 ### 2008-06-23 | 0.9.0 beta 96 * Initial public release. plugins/isicsBreadcrumbsPlugin/package.xml
r15203 r18445 11 11 <active>yes</active> 12 12 </lead> 13 <date>2009-0 2-02</date>13 <date>2009-05-19</date> 14 14 <version> 15 <release>0.9. 3</release>16 <api>0.9. 3</api>15 <release>0.9.4</release> 16 <api>0.9.4</api> 17 17 </version> 18 18 <stability> … … 57 57 <channel>pear.symfony-project.com</channel> 58 58 <min>1.1.0</min> 59 <max>1.2.0</max> 59 <max>1.3.0</max> 60 <exclude>1.3.0</exclude 60 61 </package> 61 62 </required> … … 66 67 67 68 <changelog> 68 <release> 69 <release> 69 70 <version> 70 <release>0.9. 3</release>71 <api>0.9. 3</api>71 <release>0.9.4</release> 72 <api>0.9.4</api> 72 73 </version> 73 74 <stability> … … 75 76 <api>beta</api> 76 77 </stability> 77 <date>2009-0 2-02</date>78 <date>2009-05-19</date> 78 79 <license uri="http://www.gnu.org/licenses/lgpl.html">LGPL</license> 79 80 <notes> 80 Nothing 81 Fixed package.xml 82 Updated README to markdown 81 83 </notes> 82 84 </release>