I've been trying to find a way to get a calendar view to filter based on more than one content type. I have 4 types created in CCK:

Course Events
Stage 1 Events
Stage 2 Events
Stage 3 Events

I am rendering a calendar view with snippet:

<?php
print event_page($year = $_REQUEST['year'], $month = $_REQUEST['month'], $day = $_REQUEST['day'], $view = $_REQUEST['view'],
$types=$_REQUEST['type'], $tids = NULL, $duration = NULL);
?>

To this I pass a url like:
http://www.mysite/node/303/print?year=2006&month=10&day=1&view=week&type=content-stage_1_event+content-course_event

Expecting that I'd get a filtered view with those two content types, but this is not the case.

When I look at the event.module code I see (at about line 262):

if ($types) {
    // The '+' character in a query string may be parsed as ' '.
    $types = preg_split('/[+ ]/', $types);
    foreach ($types as $type) {
      if (is_numeric($type)) {
        $ctype = module_invoke('flexinode', 'load_content_type', $type);
        if ($ctype->name) {
          $temp[$ctype->name] = 'flexinode-'. $type;
          $filter[] = $ctype->name;
        }

This suggests to me (and I may be completely wrong, due to inexperience with this level of PHP) that there should be the possibility to pass multiple content types to the filter. Is this the case?

If not, is there a way to do this?

Thanks

Comments

killes@www.drop.org’s picture

Category: bug » feature

I guess this is a feature request.

simon georges’s picture

Status: Active » Closed (won't fix)

This version of Event is not supported anymore. The issue is closed for this reason.

Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

simon georges’s picture

Duplicate comment.