| 1 | # Apostrophe Extra Slots Plugin for Apostrophe 1.5 |
|---|
| 2 | |
|---|
| 3 | For complete and extensive documentation of Apostrophe please visit |
|---|
| 4 | [trac.apostrophenow.org](http://trac.apostrophenow.org/wiki/ManualOverview). There you'll find a complete manual organized much more conveniently than is possible with a README file. |
|---|
| 5 | |
|---|
| 6 | The Apostrophe Extra Slots Plugin contains several slots that are more specialized or complex than the slots bundled with Apostrophe. |
|---|
| 7 | In general, we regard these slots to be somewhat "experimental" and use the Extra Slots plugin as a way to cultivate slot types that |
|---|
| 8 | may eventually mature to become part of the core set of Apostrophe slots. |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | Installation: |
|---|
| 12 | |
|---|
| 13 | 0. Enable the apostropheExtraSlotsPlugin in your project's projectConfiguration Class [ /config/projectConfiguration.class.php ] : |
|---|
| 14 | |
|---|
| 15 | 1. The Extra Slots Plugin requires some CSS and Javascript to fully function. Add these assets to your project level view.yml [ /apps/frontend/config/view.yml ] : |
|---|
| 16 | |
|---|
| 17 | stylesheets: |
|---|
| 18 | - /apostropheExtraSlotsPlugin/css/aExtraSlots.less |
|---|
| 19 | javascripts: |
|---|
| 20 | - /apostropheExtraSlotsPlugin/js/aExtraSlots.js |
|---|
| 21 | |
|---|
| 22 | 2. Enable the modules for the slots you want to use in your project's settings.yml [ /apps/frontend/config/settings.yml ] : |
|---|
| 23 | |
|---|
| 24 | enabled_modules: |
|---|
| 25 | - aBlogSlideshowSlot |
|---|
| 26 | - aInsetAreaSlot |
|---|
| 27 | - aInsetImageSlot |
|---|
| 28 | - aMapSlot |
|---|
| 29 | ... |
|---|
| 30 | |
|---|
| 31 | 3. Add the slots to app.yml in the slot_types [ /apps/frontend/config/app.yml ] : |
|---|
| 32 | |
|---|
| 33 | a: |
|---|
| 34 | ### Apostrophe Slots |
|---|
| 35 | slot_types: |
|---|
| 36 | ... |
|---|
| 37 | aInsetImage: Inset Image # apostropheExtraSlotsPlugin Slot |
|---|
| 38 | aInsetArea: Inset Area # apostropheExtraSlotsPlugin Slot |
|---|
| 39 | aBlogSlideshow: Blog Slideshow # apostropheExtraSlotsPlugin Slot |
|---|
| 40 | aMap: Map # apostropheExtraSlotsPlugin Slot |
|---|
| 41 | |
|---|
| 42 | 4. Add the slots to an Area or Singleton Slot in a page template [ /apps/frontend/modules/a/templates/defaultTemplate.php ] : |
|---|
| 43 | |
|---|
| 44 | <?php a_area('example', array( |
|---|
| 45 | 'allowed_types' => array( |
|---|
| 46 | 'aRichText', |
|---|
| 47 | 'aInsetImage', |
|---|
| 48 | ), |
|---|
| 49 | 'type_options' => array( |
|---|
| 50 | 'aRichText' => array( |
|---|
| 51 | 'tool' => 'Main', |
|---|
| 52 | ), |
|---|
| 53 | 'aInsetImage' => array( |
|---|
| 54 | ... |
|---|
| 55 | ), |
|---|
| 56 | ... |
|---|
| 57 | |
|---|
| 58 | Note: Slot Options for the slots can vary a lot considering the different problems they aim to solve. |
|---|
| 59 | To get a sense of the slot options specific to the slot you're working with, |
|---|
| 60 | look in the plugin's /lib/actions/Base...SlotComponents.class.php file and you will see which options exist. |
|---|