You are here

README.txt in Custom Breadcrumbs 7

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 6 README.txt
  4. 7.2 README.txt
Custom Breadcrumbs 7.x-1.x
--------------------------

Summary
-------
* Enable the module
* Click Permissions to assign user permissions for this module
* Assign 'administer custom breadcrumbs' permission to those roles that should
  be allowed to add/edit/delete custom breadcrumbs.
* Assign 'use php in custom breadcrumbs' to roles that should be allowed to use
  php to determine breadcrumb visibility.
* Go to Administer > Structure > Custom breadcrumbs to add new breadcrumbs
* Click "Add a new custom breadcrumb"
* Choose the node type to create a breadcrumb trail for
* For the titles, put each "crumb" one line after another (There is no need to
  put in "home"):

  Item 1
  SubItem A
  SuperSubItem X

* For the paths, put the path to each crumb starting after the domain name.
  Don't include a leading or trailing slash.

  item1
  item-1/subitem-a
  item-1/subitem-a/supersubitem-x

* Click save to save the breadcrumb
* Visit the page and your breadcrumb should appear!

Description
-----------
As the name suggests, Custom Breadcrumbs allows you to create and modify your
own breadcrumbs based on node type. After enabling the module, go to
Administer > Structure  > Custom breadcrumbs. You'll be abel to add new
breadcrumbs from this page.

From that page you have the option to select the node type the
breadcrumb will apply to. There are two text fields below-- "Titles" and 
"Paths." When creating a breadcrumb, you're simply creating a link. In the
custom breadcrumbs interface "Titles" describes the text of the breadcrumb
while "Paths" describes the Drupal path the breadcrumb links to. Each Title
must have a corresponding Path.

To give a very simple example of how to use this module, let's say I have a
blog on my web site called "Deep Thoughts." To create this, I use the Views
module to create a page at /blog that displays all the node types "blog post."
Whenever a user views a blog post I want the breadcrumb to show
Home > Deep Thoughts instead of simply Home. To do this I would simply type
"Deep Thoughts" in the "Titles" field and and "blog" in the "Paths" field and
save my breadcrumb.

Using the Tokens module, the Custom breadcrumbs module becomes much more
flexible because breadcrumbs can become dynamic. You can create a breadcrumb
like Home > Deep Thoughts > [Month of Blog Post] [Year of Blog Post], where
"Deep Thoughts" links to my main blog page and "[Month of Blog Post]
[Year of Blog Post]" links to a view that shows only blog posts from the month
and year the blog post was created (e.g. June 2007). For this, you would do
the following:

Node Type:
Blog Post

Titles:
Deep Thoughts
[node:created:custom:M Y]

Paths:
blog
blog/[node:created:custom:m_Y]

(where of course, blog/[node:created:custom:m_Y] is the path to the view of
blog posts from that month and year). So if you created a blog post on
June 13, 2007 your breadcrumb would show Home > Deep Thoughts > June 2007 and
"June 2007" links to "blog/06_2007" which is a view of all blog posts from
June 2007.

Also, note that Custom Breadcrumbs doesn't actually check to be sure that a
particular path exists, so you'll have to check yourself to avoid 404 errors.

Only users with 'administer custom breadcrumbs' permission will be allowed to
create or modify custom breadcrumbs.

Breadcrumb Visibility
---------------------
Users given 'use php in custom breadcrumbs' permission can include a php code
snippet that returns TRUE or FALSE to control whether or not the breadcrumb is
displayed. Note that this code has access to the $node variable, and can check
its type or any other property. Tokens should not be used in the visibility
code snippet, since they will not be replaced.

Special Identifiers
-------------------
The following identifiers can be used to achieve a special behavior:
<pathauto> - will clean any path using the current pathauto module settings,
             if that module is installed.
<none>     - can be used as a path to have a breadcrumb element that is not
             hyperlinked.

Identifiers should be added to the paths area in the following format:
identifier|path. To be recognized, the identifier must be enclosed in angular
brackets, and proceed any part of the path:

For example: <pathauto>|[node:title]

File

README.txt
View source
  1. Custom Breadcrumbs 7.x-1.x
  2. --------------------------
  3. Summary
  4. -------
  5. * Enable the module
  6. * Click Permissions to assign user permissions for this module
  7. * Assign 'administer custom breadcrumbs' permission to those roles that should
  8. be allowed to add/edit/delete custom breadcrumbs.
  9. * Assign 'use php in custom breadcrumbs' to roles that should be allowed to use
  10. php to determine breadcrumb visibility.
  11. * Go to Administer > Structure > Custom breadcrumbs to add new breadcrumbs
  12. * Click "Add a new custom breadcrumb"
  13. * Choose the node type to create a breadcrumb trail for
  14. * For the titles, put each "crumb" one line after another (There is no need to
  15. put in "home"):
  16. Item 1
  17. SubItem A
  18. SuperSubItem X
  19. * For the paths, put the path to each crumb starting after the domain name.
  20. Don't include a leading or trailing slash.
  21. item1
  22. item-1/subitem-a
  23. item-1/subitem-a/supersubitem-x
  24. * Click save to save the breadcrumb
  25. * Visit the page and your breadcrumb should appear!
  26. Description
  27. -----------
  28. As the name suggests, Custom Breadcrumbs allows you to create and modify your
  29. own breadcrumbs based on node type. After enabling the module, go to
  30. Administer > Structure > Custom breadcrumbs. You'll be abel to add new
  31. breadcrumbs from this page.
  32. From that page you have the option to select the node type the
  33. breadcrumb will apply to. There are two text fields below-- "Titles" and
  34. "Paths." When creating a breadcrumb, you're simply creating a link. In the
  35. custom breadcrumbs interface "Titles" describes the text of the breadcrumb
  36. while "Paths" describes the Drupal path the breadcrumb links to. Each Title
  37. must have a corresponding Path.
  38. To give a very simple example of how to use this module, let's say I have a
  39. blog on my web site called "Deep Thoughts." To create this, I use the Views
  40. module to create a page at /blog that displays all the node types "blog post."
  41. Whenever a user views a blog post I want the breadcrumb to show
  42. Home > Deep Thoughts instead of simply Home. To do this I would simply type
  43. "Deep Thoughts" in the "Titles" field and and "blog" in the "Paths" field and
  44. save my breadcrumb.
  45. Using the Tokens module, the Custom breadcrumbs module becomes much more
  46. flexible because breadcrumbs can become dynamic. You can create a breadcrumb
  47. like Home > Deep Thoughts > [Month of Blog Post] [Year of Blog Post], where
  48. "Deep Thoughts" links to my main blog page and "[Month of Blog Post]
  49. [Year of Blog Post]" links to a view that shows only blog posts from the month
  50. and year the blog post was created (e.g. June 2007). For this, you would do
  51. the following:
  52. Node Type:
  53. Blog Post
  54. Titles:
  55. Deep Thoughts
  56. [node:created:custom:M Y]
  57. Paths:
  58. blog
  59. blog/[node:created:custom:m_Y]
  60. (where of course, blog/[node:created:custom:m_Y] is the path to the view of
  61. blog posts from that month and year). So if you created a blog post on
  62. June 13, 2007 your breadcrumb would show Home > Deep Thoughts > June 2007 and
  63. "June 2007" links to "blog/06_2007" which is a view of all blog posts from
  64. June 2007.
  65. Also, note that Custom Breadcrumbs doesn't actually check to be sure that a
  66. particular path exists, so you'll have to check yourself to avoid 404 errors.
  67. Only users with 'administer custom breadcrumbs' permission will be allowed to
  68. create or modify custom breadcrumbs.
  69. Breadcrumb Visibility
  70. ---------------------
  71. Users given 'use php in custom breadcrumbs' permission can include a php code
  72. snippet that returns TRUE or FALSE to control whether or not the breadcrumb is
  73. displayed. Note that this code has access to the $node variable, and can check
  74. its type or any other property. Tokens should not be used in the visibility
  75. code snippet, since they will not be replaced.
  76. Special Identifiers
  77. -------------------
  78. The following identifiers can be used to achieve a special behavior:
  79. - will clean any path using the current pathauto module settings,
  80. if that module is installed.
  81. - can be used as a path to have a breadcrumb element that is not
  82. hyperlinked.
  83. Identifiers should be added to the paths area in the following format:
  84. identifier|path. To be recognized, the identifier must be enclosed in angular
  85. brackets, and proceed any part of the path:
  86. For example: |[node:title]