diff --git a/plugins/context_condition_entity.inc b/plugins/context_condition_entity.inc index 23ad20f..ef127ac 100644 --- a/plugins/context_condition_entity.inc +++ b/plugins/context_condition_entity.inc @@ -11,10 +11,20 @@ class context_condition_entity extends context_condition { if (!empty($info['configuration'])) { continue; } + // Ignore entities without a view mode, which indicates that the entity + // objects cannot be viewed on their own. + if (empty($info['view modes'])) { + continue; + } if (!empty($info['bundles'])) { foreach ($info['bundles'] as $bundle => $bundle_info) { - $values[$type . ';' . $bundle] = $info['label'] . ' (' . $bundle_info['label'] . ')'; + if ($info['label'] != $bundle_info['label']) { + $values[$type . ';' . $bundle] = $info['label'] . ': ' . $bundle_info['label']; + } + else { + $values[$type] = $info['label']; + } } } else {