Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_ct_event
Commits
ac6747ad
Commit
ac6747ad
authored
Oct 19, 2011
by
ccarigna
Browse files
Added breadcrumbs to the node view (currently does not support repeating dates)
parent
d5e181f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
uw_ct_event.module
View file @
ac6747ad
...
...
@@ -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
);
// */
drupal_set_breadcrumb
(
$breadcrumb
);
}
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment