By Anonymous (not verified) on
How can I print a node breadcrumbs into a node.tpl.php?
When I insert print $breadcrumb; into a node.tpl.php template it only displays "array"
How can I print a node breadcrumbs into a node.tpl.php?
When I insert print $breadcrumb; into a node.tpl.php template it only displays "array"
Comments
A list of the variables
A list of the variables available in node.tpl.php is available here.
$breadcrumb is available in page.tpl.php as outlined here.
This is a handbook page detailing how to make additional variables available to your templates. While it probably doesn't deal with this specific case, maybe it can get you started.
--keith
Thanks I'll take a look, but
Thanks I'll take a look, but it seems to complicated for a non-coder.
For a list of variables
For a list of variables available at page level/scope: http://drupal.org/node/11812
For a list of variables available at node level/scope: http://drupal.org/node/11816
As you can see, $breadcrumb is used by page level templates (e.g. page.tpl.php, page-front.tpl.php, etc), not node level.
Try: <?phpprint
Try:
- Corey
Now its display "Array >
Now its display "Array > Array > Array".
Do I have to add anything to template.php?
That's weird. Well, try
That's weird. Well, try this next bit of code. If it doesn't work, then you know there is a problem somewhere else, such as any code that alters the normal breadcrumb trail.
- Corey
Thank you so much!!! Now
Thank you so much!!! Now it's ok!!
Drupal 7 version.
-Tim
thank u!
thank u!