Hiển thị các bài đăng có nhãn Breadcrumbs. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Breadcrumbs. Hiển thị tất cả bài đăng

Thứ Năm, 17 tháng 11, 2011

Views Breadcrumbs using Arguments



For most of my clients, I need to create Breadcrumbs. Seemingly easily, breadbrumbs is an area that is a bit more involved than most features in Drupal. There's a great module out there called custom_breadcrumbs. The module works great for the display of breadcrumbs on all node pages, but doesn't (yet) work with views.
After doing some research about a solution for view pages, here's my favorite pick: Views Arguments.
For a simple overview page (that uses views), add a "Global: Null" Argument. Within that argument, select "Provide default argument" and select "PHP Code". In here, you can use the drupal_set_breadcrumb function. That function accepts an array of link titles and paths. Here's an example: