By inductor on
Hi all,
I`m developing the customized breadcrumb for a new site. F.e. I have a view called 'news'. When user navigates to a specific news node, I want the breadcrumb to display: 'Home' -> 'News' -> 'News node', where 'Home' and 'News' are links, and 'News node' is plain text. I used hook_nodeapi to achieve that, and it works well.
The question is: How do I do the same thing for the view? When user is viewing the news list, I want the breadcrumb to be 'Home' -> 'News'. Which hook should I use to determine the current view name? In other words, that hook should allow me to guess is the view called from the block, or is displayed on a single page.
Thanks in advance, and sorry for my English.
Comments
I think you would be better
I think you would be better off using the Custom Breadcrumbs module to do what you want, you just have to tell the 'news' node type to use the word "News" in the breadcrumbs.
Thanks for the reply,
Thanks for the reply, Rowanw.
Yes, I started with the Custom Breadcrumbs, but it lacked the functionality I needed (custom user profiles breadcrumbs, parent-child node relationships etc.). The problem that I cannot construct sane breadcrumbs on views pages (neither with Custom Breadcrumbs, nor with my module). More specifically, I want the view name to be in breadcrumb when this view is displayed on a page ('Home' -> 'News' breadcrumb when viewing the news list). I can`t achieve this with menu, because it has different structure. So is there a hook I can use to determine a view name when viewing it on a page (not in the block)?
Thanks.
----
input#edit-delete { margin-left: 4em;}
OK, I`ve found that
OK, I`ve found that
$GLOBALS['current_view']thingie. But it triggers on the block views also. How do I separate views called from the block and from the page?--
input#edit-delete { margin-left: 4em;}