You are here

README.txt in Fieldable Panels Panes (FPP) 7

Same filename and directory in other branches
  1. 1.0.x README.txt
Fieldable Panel Panes supports multiple bundles, which may be managed at
admin/structure/fieldable-panels-panes.

Bundles can also be created in a module via hook_entity_info_alter(). The code
will look something like this:

function MYMODULE_entity_info_alter(&$entity_info) {
  $entity_info['fieldable_panels_pane']['bundles']['my_bundle_name'] = array(
    'label' => t('My bundle name'),
    'pane category' => t('My category name'),
    'pane top level' => FALSE, // set to true to make this show as a top level icon
    'pane icon' => '/path/to/custom/icon/for/this/pane.png',
    'admin' => array(
      'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type',
      'bundle argument' => 3,
      // Note that this has all _ replaced with - from the bundle name.
      'real path' => 'admin/structure/fieldable-panels-panes/my-bundle-name',
      'access arguments' => array('administer fieldable panels panes'),
    ),
  );
}

Fields are then added to your bundle as normal through the Manage Fields and
Display Fields tabs in the UI.

You can use this hook to rename or remove the default bundle but remember that
doing so will break any content currently using that bundle. If you do this
be sure to also fix any content already using it. It is recommended that you
use the bundle management UI in admin/structure/fieldable-panels-panes so you
don't have to maintain this yourself.


Installation notes
------------------
By default a Fieldable Panels Pane type called "Panels pane" will be created. To
skip this, set the variable "fieldable_panels_panes_skip_default_type" to TRUE
prior to installing the module.


A note about view modes
-----------------------
When viewing an FPP object on its own page, e.g.
admin/structure/fieldable-panels-panes/view/1, the 'preview' view mode will be
used if it has been customized, otherwise it defaults to 'default'.


Related modules
--------------------------------------------------------------------------------
* Organic Groups Fieldable Panels Panes
  https://www.drupal.org/project/og_fpp
  This is a bridge module to ease simultaneous usage of Organic Groups,
  Fieldable Panels Panes and Panelizer.
* Entity cache
  https://www.drupal.org/project/entitycache
  FPP provides support for using the entity cache module.
* Panels Cache Expiration
  https://www.drupal.org/project/expire_panels
  Trigger cache expiration of other objects when FPPs are changed.

File

README.txt
View source
  1. Fieldable Panel Panes supports multiple bundles, which may be managed at
  2. admin/structure/fieldable-panels-panes.
  3. Bundles can also be created in a module via hook_entity_info_alter(). The code
  4. will look something like this:
  5. function MYMODULE_entity_info_alter(&$entity_info) {
  6. $entity_info['fieldable_panels_pane']['bundles']['my_bundle_name'] = array(
  7. 'label' => t('My bundle name'),
  8. 'pane category' => t('My category name'),
  9. 'pane top level' => FALSE, // set to true to make this show as a top level icon
  10. 'pane icon' => '/path/to/custom/icon/for/this/pane.png',
  11. 'admin' => array(
  12. 'path' => 'admin/structure/fieldable-panels-panes/%fieldable_panels_pane_type',
  13. 'bundle argument' => 3,
  14. // Note that this has all _ replaced with - from the bundle name.
  15. 'real path' => 'admin/structure/fieldable-panels-panes/my-bundle-name',
  16. 'access arguments' => array('administer fieldable panels panes'),
  17. ),
  18. );
  19. }
  20. Fields are then added to your bundle as normal through the Manage Fields and
  21. Display Fields tabs in the UI.
  22. You can use this hook to rename or remove the default bundle but remember that
  23. doing so will break any content currently using that bundle. If you do this
  24. be sure to also fix any content already using it. It is recommended that you
  25. use the bundle management UI in admin/structure/fieldable-panels-panes so you
  26. don't have to maintain this yourself.
  27. Installation notes
  28. ------------------
  29. By default a Fieldable Panels Pane type called "Panels pane" will be created. To
  30. skip this, set the variable "fieldable_panels_panes_skip_default_type" to TRUE
  31. prior to installing the module.
  32. A note about view modes
  33. -----------------------
  34. When viewing an FPP object on its own page, e.g.
  35. admin/structure/fieldable-panels-panes/view/1, the 'preview' view mode will be
  36. used if it has been customized, otherwise it defaults to 'default'.
  37. Related modules
  38. --------------------------------------------------------------------------------
  39. * Organic Groups Fieldable Panels Panes
  40. https://www.drupal.org/project/og_fpp
  41. This is a bridge module to ease simultaneous usage of Organic Groups,
  42. Fieldable Panels Panes and Panelizer.
  43. * Entity cache
  44. https://www.drupal.org/project/entitycache
  45. FPP provides support for using the entity cache module.
  46. * Panels Cache Expiration
  47. https://www.drupal.org/project/expire_panels
  48. Trigger cache expiration of other objects when FPPs are changed.