You are here

README.txt in Node Hierarchy 5

Same filename and directory in other branches
  1. 6.3 README.txt
  2. 6 README.txt
  3. 6.2 README.txt
  4. 7.4 README.txt
  5. 7.2 README.txt
-------------------------------------------------------------------------------
Node Hierarchy for Drupal 5.x
  by Ronan Dowling, Gorton Studios - ronan (at) gortonstudios (dot) com	
-------------------------------------------------------------------------------

Node Hierarchy is a module which allows nodes to be children of other nodes
creating a tree-like hierarchy of content.

The module offers:
  * Automatic hierarchical urls using pathauto
    (eg: http://example.com/aboutus/history/beginning).
  * Automatic creation of hierarchical menus if desired.
  * Optional Views integration.
  * Optional Node Access integration

-------------------------------------------------------------------------------
Installation
------------
Go to administer -> site building -> modules and enable the Node Hierarchy
module.

You must then tell the module which node types can be parents and which can be
children. To do this you can either:
1) Go to administer -> content administration -> content types. Click edit on
the types you want modify and check the "Can be parent" and "Can be child"
checkboxes
-- OR --
2) Go to administer -> settings -> Node Hierarchy and check the boxes in the for
the desired types.

You can also pick a default node for each given type. For example, you can
create a page called "Blogs" and have nodes of type "blog" be a child of that
page by default.

You will also need to assign the following permissions to the appropriate users:

1) create child nodes
   For users who are allowed to create children under existing nodes.
2) edit all node parents
   For users who are allowed to change the parent of any node, regardless of
   authorship.
3) edit own node parents
   For users who are allowed to change the parent of nodes which they have
   authored.
4) reorder children
   For users who are allowed to change the order of children on any node.
5) view site outline
   For users who are allowed to view the site outline
6) administer hierarchy
   For users who are allowed to edit the node hierarchy defaults.


-------------------------------------------------------------------------------
Using Node Hierarchy
--------------------
To assign a parent to a node, either:
1) Create a new node of a type that whose "Can be child" setting is true or edit
   an existing node. Expand the Node Hierarchy fieldset and chose a parent from
   the pulldown.
-- OR --
2) Navigate to the node you wish to make a parent. Click on the children tab,
   and click on one of the create links at the bottom of the tab.

To create a menu for a node:
Edit the node, expand the Node Hierarchy fieldset and check the "Create Menu"
box. Click Submit.
If the node's parent has a menu item, a new menu will be created for the node
under it's parent's menu item. The name of the menu item will be the title of
the node and it's weight will be the node's sort order.

If you edit the parent of a node or it's title, you can recreate an existing
menu item by checking "Recreate Menu". This will set the menu item's parent to
the new parent and the title to the new title. This is not done automatically
on edit, so that you can maintain menu hierarchy separately from node hierarchy
if desired.

If the node does not have a parent or it's parent does not have a menu item, the
new menu item will be a child of the default menu item set in the Node
Hierarchty settings.

Reordering Child Nodes:
Use the green arrow links on the Children tab of the parent node to rearrange
child nodes. This will also update the order of any generated menu items as long
as they have not been moved from their original location.

-------------------------------------------------------------------------------
Pathauto 1.x
------------
Node Hierarchy integrates with Pathauto to create hierarcichal urls. There are
two tokens provided to Pathauto 1.x by Node Hierarchy:
1) [hierarchypath] - This is the path of the node's parent.
2) [fullhierarchypath] - This is the path to the node including the node's own
    name. You can use this token on it's own to create hierarchical urls for your
    nodes. This token is the same as [title] for nodes which do not have a parent.

Token and Pathauto 2.x
----------------------
Node Hierarchy integrates with token (and therefore Pathauto 2.x and others).
For a description of available tokens see the Pathauto setting screen (or any
other token list).

For Pathauto, the recommended token to use is [fullhierarchypath] as it will
reflect any changes you have made to the url of a nodes ancestors. For example,
if you have a node called "our history" but you forgo automatically generated
urls and create the path alias 'history' for that node, it's children will have
the automatically generated paths 'history/xxx' instead of 'our-history/xxx'.

Views
-----
Node hierarchy integrates with Views providing the following:

Arguments:
  Parent Node Id - Takes a node id and returns only nodes which are children of
  that node. Used to provide lists of children for a give node.

Fields:
  Sort Order - The numerical sort order of a child node.
  Actions - A set of actions to manipulate child nodes. Should only be used in
  views accessible by Administrators.

Sort Fields:
  Sort Order - Use this to sort child nodes by their Node Hierarchy sort order.

To enable views integration, turn on the Node Hierarchy Views module. With this
module turned on, you will also be able to embed a view of a node's children on
that node's page.

-------------------------------------------------------------------------------
Node Access
-----------
Node hierarchy integrates with the nodeaccess module.
  http://drupal.org/project/nodeaccess

To enable this integration simply enable the Node Hierarchy Access Module.
Once this module is enabled, grants added to a node will be autimatically added
all descendant nodes. This allows access control on an entire branch of the site
tree.

-------------------------------------------------------------------------------
Known Issues
------------
* Not tested for large number of child nodes.
* Settings can break with long content type names.
* Does not respect revisions. Hierarchy settings are revision independant.
* Not tested with pgsql install

-------------------------------------------------------------------------------
TODO
----
* Improve "Can be child" setting to allow admins to specify which node types
  can be children of which node types. (e.g. 'chapter' nodes can only be
  children of 'book' nodes)
* Drag and drop reordering and parent changing.
* OPML imoport and export.

-------------------

File

README.txt
View source
  1. -------------------------------------------------------------------------------
  2. Node Hierarchy for Drupal 5.x
  3. by Ronan Dowling, Gorton Studios - ronan (at) gortonstudios (dot) com
  4. -------------------------------------------------------------------------------
  5. Node Hierarchy is a module which allows nodes to be children of other nodes
  6. creating a tree-like hierarchy of content.
  7. The module offers:
  8. * Automatic hierarchical urls using pathauto
  9. (eg: http://example.com/aboutus/history/beginning).
  10. * Automatic creation of hierarchical menus if desired.
  11. * Optional Views integration.
  12. * Optional Node Access integration
  13. -------------------------------------------------------------------------------
  14. Installation
  15. ------------
  16. Go to administer -> site building -> modules and enable the Node Hierarchy
  17. module.
  18. You must then tell the module which node types can be parents and which can be
  19. children. To do this you can either:
  20. 1) Go to administer -> content administration -> content types. Click edit on
  21. the types you want modify and check the "Can be parent" and "Can be child"
  22. checkboxes
  23. -- OR --
  24. 2) Go to administer -> settings -> Node Hierarchy and check the boxes in the for
  25. the desired types.
  26. You can also pick a default node for each given type. For example, you can
  27. create a page called "Blogs" and have nodes of type "blog" be a child of that
  28. page by default.
  29. You will also need to assign the following permissions to the appropriate users:
  30. 1) create child nodes
  31. For users who are allowed to create children under existing nodes.
  32. 2) edit all node parents
  33. For users who are allowed to change the parent of any node, regardless of
  34. authorship.
  35. 3) edit own node parents
  36. For users who are allowed to change the parent of nodes which they have
  37. authored.
  38. 4) reorder children
  39. For users who are allowed to change the order of children on any node.
  40. 5) view site outline
  41. For users who are allowed to view the site outline
  42. 6) administer hierarchy
  43. For users who are allowed to edit the node hierarchy defaults.
  44. -------------------------------------------------------------------------------
  45. Using Node Hierarchy
  46. --------------------
  47. To assign a parent to a node, either:
  48. 1) Create a new node of a type that whose "Can be child" setting is true or edit
  49. an existing node. Expand the Node Hierarchy fieldset and chose a parent from
  50. the pulldown.
  51. -- OR --
  52. 2) Navigate to the node you wish to make a parent. Click on the children tab,
  53. and click on one of the create links at the bottom of the tab.
  54. To create a menu for a node:
  55. Edit the node, expand the Node Hierarchy fieldset and check the "Create Menu"
  56. box. Click Submit.
  57. If the node's parent has a menu item, a new menu will be created for the node
  58. under it's parent's menu item. The name of the menu item will be the title of
  59. the node and it's weight will be the node's sort order.
  60. If you edit the parent of a node or it's title, you can recreate an existing
  61. menu item by checking "Recreate Menu". This will set the menu item's parent to
  62. the new parent and the title to the new title. This is not done automatically
  63. on edit, so that you can maintain menu hierarchy separately from node hierarchy
  64. if desired.
  65. If the node does not have a parent or it's parent does not have a menu item, the
  66. new menu item will be a child of the default menu item set in the Node
  67. Hierarchty settings.
  68. Reordering Child Nodes:
  69. Use the green arrow links on the Children tab of the parent node to rearrange
  70. child nodes. This will also update the order of any generated menu items as long
  71. as they have not been moved from their original location.
  72. -------------------------------------------------------------------------------
  73. Pathauto 1.x
  74. ------------
  75. Node Hierarchy integrates with Pathauto to create hierarcichal urls. There are
  76. two tokens provided to Pathauto 1.x by Node Hierarchy:
  77. 1) [hierarchypath] - This is the path of the node's parent.
  78. 2) [fullhierarchypath] - This is the path to the node including the node's own
  79. name. You can use this token on it's own to create hierarchical urls for your
  80. nodes. This token is the same as [title] for nodes which do not have a parent.
  81. Token and Pathauto 2.x
  82. ----------------------
  83. Node Hierarchy integrates with token (and therefore Pathauto 2.x and others).
  84. For a description of available tokens see the Pathauto setting screen (or any
  85. other token list).
  86. For Pathauto, the recommended token to use is [fullhierarchypath] as it will
  87. reflect any changes you have made to the url of a nodes ancestors. For example,
  88. if you have a node called "our history" but you forgo automatically generated
  89. urls and create the path alias 'history' for that node, it's children will have
  90. the automatically generated paths 'history/xxx' instead of 'our-history/xxx'.
  91. Views
  92. -----
  93. Node hierarchy integrates with Views providing the following:
  94. Arguments:
  95. Parent Node Id - Takes a node id and returns only nodes which are children of
  96. that node. Used to provide lists of children for a give node.
  97. Fields:
  98. Sort Order - The numerical sort order of a child node.
  99. Actions - A set of actions to manipulate child nodes. Should only be used in
  100. views accessible by Administrators.
  101. Sort Fields:
  102. Sort Order - Use this to sort child nodes by their Node Hierarchy sort order.
  103. To enable views integration, turn on the Node Hierarchy Views module. With this
  104. module turned on, you will also be able to embed a view of a node's children on
  105. that node's page.
  106. -------------------------------------------------------------------------------
  107. Node Access
  108. -----------
  109. Node hierarchy integrates with the nodeaccess module.
  110. http://drupal.org/project/nodeaccess
  111. To enable this integration simply enable the Node Hierarchy Access Module.
  112. Once this module is enabled, grants added to a node will be autimatically added
  113. all descendant nodes. This allows access control on an entire branch of the site
  114. tree.
  115. -------------------------------------------------------------------------------
  116. Known Issues
  117. ------------
  118. * Not tested for large number of child nodes.
  119. * Settings can break with long content type names.
  120. * Does not respect revisions. Hierarchy settings are revision independant.
  121. * Not tested with pgsql install
  122. -------------------------------------------------------------------------------
  123. TODO
  124. ----
  125. * Improve "Can be child" setting to allow admins to specify which node types
  126. can be children of which node types. (e.g. 'chapter' nodes can only be
  127. children of 'book' nodes)
  128. * Drag and drop reordering and parent changing.
  129. * OPML imoport and export.
  130. -------------------