I'm trying to assemble my own calendar view, instead of starting from the stock calendar view. I bumped into a weird piece of code:

In includes/calendar_plugin_style.inc, method calendar_plugin_style::display_types(), the code that returns available display types does the following:

           $attachments = array_filter($display->display_options['displays']);
            if (isset($attachments['calendar_1'])) {
              $ids[$name] = $id;
              $names[$name] = $display->display_title;
            }

If I understand this correctly, the display should be explicitly named calendar_1 for the plugin style to pick it up.

Is there a necessity for this magic condition?

Comments

infojunkie’s picture

For what it's worth, I ended up patching the module to replace

if (isset($attachments['calendar_1'])) {

with

if (TRUE) {

and got the result I needed.

Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.