Commit ac6747ad authored by ccarigna's avatar ccarigna
Browse files

Added breadcrumbs to the node view (currently does not support repeating dates)

parent d5e181f1
......@@ -245,17 +245,15 @@ function uw_ct_event_page_build() {
$breadcrumb = drupal_get_breadcrumb();
$breadcrumb[1] = l('Events', 'events');
/* TODO: update the breadcrumbs to use the event date information
// BUT --
// how to handle repeating dates or dates that carry over multiple months (?)
$year = date('Y', $node->created);
$month_name = date('F', $node->created);
$month_number = date('n', $node->created);
// TODO: determine how to handle repeating dates (edge case)
// currently we only check the very first start date
$start_date = strtotime($node->field_event_date[$node->language][0]['value']);
$year = date('Y', $start_date);
$month_name = date('F', $start_date);
$month_number = date('m', $start_date);
$breadcrumb[2] = l($year, 'events/archive/'.$year);
$breadcrumb[3] = l($month_name, 'events/archive/'.$year.'-'.$month_number);
// */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment