You are here

README.txt in Panelizer 7.2

ABOUT Panelizer 7.x-2.x

Panelizer allows you to treat supported entity as panels, giving options
for different default panels on a per bundle (node type/taxonomy vocabulary)
basis.

Panelizer currently contains support for Node, Taxonomy Term and User
entities. However, this is constructed as a plugin and more may be available
in the future.

INSTALLING

Install this through the normal Drupal method of putting the module in
sites/all/modules and going to admin/modules to activate it.

It requires Panels and Page Manager.

INITIAL CONFIGURATION

Visit Configuration >> Panelizer to enable the module for the entities you
need. You may need to visit Site Building >> Pages and enable the appropriate
pages for supported entities.

Note that in all cases, modifying panelizer settings for an entity requires
update privileges for that entity.

Panelizer operates in four basic modes:

- No Default, No Choice
  In this mode, the given bundle is panelized, but there is no default panel
  associated or selectable. In this case, each entity has a small form on
  the Panelizer tab that says to 'Panelize it!'. When this button is clicked,
  a default panel is attached to the entity, and the panel may then be
  customized.

- With Default, No Choice
  In this mode, all entities of given bundle are given the default panel
  automatically. Users with appropriate privileges may then customize the
  panel for that node. Once customized, the default is no longer applied
  and changes to the default will not propagate downstream.

- No default, With Choice
  In this mode, all entities will be given a selector to choose which
  panel to display on the entity page. The default choice will be 
  "No Panel". When a panel has been chosen, users with permission can then
  customize that panel. Once this is done, the default choice will no
  longer be associated with the panel and a choice can no longer be made.
  The "Reset" button on the panelizer settings tab for that entity can
  return the entity to a default state and restore the choice.

- With default, With Choice
  Like above, entities will have a selector to choose which panel to use.
  However, unlike above, entities that have never made a selection will
  automatically be given the default panel. All configured entities will 
  have some kind of panel, whether it is one of the choices or a customized
  panel for that entity.

PERMISSIONS

Once panelizer is enabled for an entity/bundle combination, it may be
necessary to visit People >> Permissions and give users appropriate
permissions. All of the Panelizer tabs have their own permission, and
if these are revoked it is possible to create panelized entities that can
only choose panels but not modify them.

CAVEATS

Panelizer currently uses the Page Manager to render the panelized entities.
At this time there is no direct support for view modes. This is a desired
feature, though we are somewhat hampered by Drupal only allowing 2 levels
of local tasks (tabs) where configuring for multiple view modes really would
prefer a third level.

Panelizer 7.x-2.x is Revision Aware. This has the downside that duplicating
panels for revisions can generate a lot of extra data. Please keep this in
mind -- it may be necessary to periodically clean up older revisions. Panels
will not duplicate a display if it thinks the display was not changed,
however.

API

Panelizer 7.x-2.x is constructed on an Object Oriented plugin. There is one
plugin per entity type and it MUST be named exactly the same as the entity
type. The easiest way to add Panelizer support for a custom entity is to 
copy the node entity. 

As a CTools plugin, you will be required to implement 
hook_ctools_plugin_directory. Then copy node.inc to your plugin directory
as MY_ENTITY_TYPE.inc and modify the name of the handler it uses. Copy
PanelizerEntityNode.class.php to MyModuleEntityMyEntity.class.php -- and
make sure the name of this file matches the handler in your .inc file.

The required implementation pieces are straightforward. You do need to set
a flag if the entity supports revisions so that Panelizer can write the
information.

If your entity does not support bundles, you can only panelize the entire
entity.

Future functionality
  - Allow panels for different build modes -- this is tricky
  - Implement panel subtabs. i.e, allow node/27/arbitrarylink to be a subtab
    of an entity, using panelizer.
  - Allow some other way of panelizing entities other than bundles. Either
    that or find a contrib module to allow users to have bundles.

File

README.txt
View source
  1. ABOUT Panelizer 7.x-2.x
  2. Panelizer allows you to treat supported entity as panels, giving options
  3. for different default panels on a per bundle (node type/taxonomy vocabulary)
  4. basis.
  5. Panelizer currently contains support for Node, Taxonomy Term and User
  6. entities. However, this is constructed as a plugin and more may be available
  7. in the future.
  8. INSTALLING
  9. Install this through the normal Drupal method of putting the module in
  10. sites/all/modules and going to admin/modules to activate it.
  11. It requires Panels and Page Manager.
  12. INITIAL CONFIGURATION
  13. Visit Configuration >> Panelizer to enable the module for the entities you
  14. need. You may need to visit Site Building >> Pages and enable the appropriate
  15. pages for supported entities.
  16. Note that in all cases, modifying panelizer settings for an entity requires
  17. update privileges for that entity.
  18. Panelizer operates in four basic modes:
  19. - No Default, No Choice
  20. In this mode, the given bundle is panelized, but there is no default panel
  21. associated or selectable. In this case, each entity has a small form on
  22. the Panelizer tab that says to 'Panelize it!'. When this button is clicked,
  23. a default panel is attached to the entity, and the panel may then be
  24. customized.
  25. - With Default, No Choice
  26. In this mode, all entities of given bundle are given the default panel
  27. automatically. Users with appropriate privileges may then customize the
  28. panel for that node. Once customized, the default is no longer applied
  29. and changes to the default will not propagate downstream.
  30. - No default, With Choice
  31. In this mode, all entities will be given a selector to choose which
  32. panel to display on the entity page. The default choice will be
  33. "No Panel". When a panel has been chosen, users with permission can then
  34. customize that panel. Once this is done, the default choice will no
  35. longer be associated with the panel and a choice can no longer be made.
  36. The "Reset" button on the panelizer settings tab for that entity can
  37. return the entity to a default state and restore the choice.
  38. - With default, With Choice
  39. Like above, entities will have a selector to choose which panel to use.
  40. However, unlike above, entities that have never made a selection will
  41. automatically be given the default panel. All configured entities will
  42. have some kind of panel, whether it is one of the choices or a customized
  43. panel for that entity.
  44. PERMISSIONS
  45. Once panelizer is enabled for an entity/bundle combination, it may be
  46. necessary to visit People >> Permissions and give users appropriate
  47. permissions. All of the Panelizer tabs have their own permission, and
  48. if these are revoked it is possible to create panelized entities that can
  49. only choose panels but not modify them.
  50. CAVEATS
  51. Panelizer currently uses the Page Manager to render the panelized entities.
  52. At this time there is no direct support for view modes. This is a desired
  53. feature, though we are somewhat hampered by Drupal only allowing 2 levels
  54. of local tasks (tabs) where configuring for multiple view modes really would
  55. prefer a third level.
  56. Panelizer 7.x-2.x is Revision Aware. This has the downside that duplicating
  57. panels for revisions can generate a lot of extra data. Please keep this in
  58. mind -- it may be necessary to periodically clean up older revisions. Panels
  59. will not duplicate a display if it thinks the display was not changed,
  60. however.
  61. API
  62. Panelizer 7.x-2.x is constructed on an Object Oriented plugin. There is one
  63. plugin per entity type and it MUST be named exactly the same as the entity
  64. type. The easiest way to add Panelizer support for a custom entity is to
  65. copy the node entity.
  66. As a CTools plugin, you will be required to implement
  67. hook_ctools_plugin_directory. Then copy node.inc to your plugin directory
  68. as MY_ENTITY_TYPE.inc and modify the name of the handler it uses. Copy
  69. PanelizerEntityNode.class.php to MyModuleEntityMyEntity.class.php -- and
  70. make sure the name of this file matches the handler in your .inc file.
  71. The required implementation pieces are straightforward. You do need to set
  72. a flag if the entity supports revisions so that Panelizer can write the
  73. information.
  74. If your entity does not support bundles, you can only panelize the entire
  75. entity.
  76. Future functionality
  77. - Allow panels for different build modes -- this is tricky
  78. - Implement panel subtabs. i.e, allow node/27/arbitrarylink to be a subtab
  79. of an entity, using panelizer.
  80. - Allow some other way of panelizing entities other than bundles. Either
  81. that or find a contrib module to allow users to have bundles.