how to create iCal feed .net?

How to create an iCal feed of non-Nodes?

  • It looks like the Calendar/Dates modules don't add Views Display types directly. Instead you're apparently supposed to http://drupal.org/node/348871#comment-3978646. However, the default views are Node views and I want to create a view of non-nodes. For example, say I want to create an iCal feed display type listing the dates users created their accounts on the site. Is there a way to do that using the Calendar/Date modules? I made http://drupal.org/node/348871#comment-3978646 http://drupal.org/node/446614#comment-3888048 to use the iCal functionality included with the Calendar module, but in the end I gave up on that idea. Instead, found an http://drupal.org/node/747490 associated with the http://drupal.org/project/views_bonus, with code for adding iCal support to that module. I made some http://drupal.org/node/747490#comment-4791554. I'm interested in hearing feedback on the idea, if anyone here gets a chance to try it out.

  • Answer:

    You can do this. Make calendar module create an extra default view: variable_set('calendar_default_view_options', array( array('name' => 'calendar'), array('name' => 'calendar_custom') )); After clearing cache you should now have two calendar default views which are exactly the same. Override the custom calendar view. hook_views_default_view_alter(&$views) { if (isset($views['calendar_custom']) { $views['calendar_custom']->base_table = 'users'; } } You can change the base table of the view, which is what Views will use to determine what you can query from. Note this is example code and untested, but should work.

Matt V. at Drupal Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.