Commit bb87ea4a authored by Karen Stevenson's avatar Karen Stevenson

Issue #1529326, Hide the links. Also add better methods to hide the title and comments.

parent df2ed98e
......@@ -5,7 +5,10 @@ Date iCal 7.x
Version 7.x-1.x-dev
===================
- Better methods to hide the title and comments.
- Issue #1529326, Hide the links.
- Add dependency on Entity module.
- Add the Date/Time package to .info file.
===================
Version 7.x-1.0
......
......@@ -49,15 +49,28 @@ function theme_date_ical_icon($variables) {
*/
function date_ical_preprocess_node(&$variables) {
if (isset($variables['view_mode']) && $variables['view_mode'] == 'ical') {
// We hide the page elements we won't want to see.
// The display of the body and other fields will be controlled
// by the Display Fields settings for the ical view mode.
$variables['title'] = '';
// Trick the default node template into not displaying the page title by telling it this is page.
$variables['page'] = TRUE;
$variables['title_prefix'] = '';
$variables['title_suffix'] = '';
// We probably don't want to see the author information in our feed.
$variables['display_submitted'] = FALSE;
$variables['links'] = '';
$variables['comments'] = '';
// No comments in a feed.
if (isset($variables['content']['comments'])) {
unset($variables['content']['comments']);
}
// No links in a feed.
if (isset($variables['content']['links'])) {
unset($variables['content']['links']);
}
}
}
......
Markdown is supported
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