0

I am using the Calendar module. I was asked if it was possible to take the calendar page and put it inside of another. I'm not so sure about this. How would I add this to be inside the Content region of the other page? I see how it is possible to add the Calendar block to the Content region of the page but that is not what these people want...they want the full Calendar view inside of another page! Any ideas how I would go about doing this?

This is the Calendar module installed in Drupal 6.

1 Answer 1

0

If I am understanding you correctly, all you should need to do is go into the View UI and click on the clone link of the existing calendar view and then enter the new path in the page display and appropriate date field to use.

ADDITION:

based upon your comment below, you could set a variable in a preprocess hook to the output of this view, eg:

$vars['cal']=views_embed_view('calendar','calendar_1');

and then you would have $cal inside your template to use however you wanted. If you needed this information inside of a node, eg in a text field that would be displayed between those paragraphs of other text, you could probably hook into nodeapi() and set it there on display of the node. If you need it embeddable inside a field amongst other text, that gets trickier, but doable with a custom filter of your own (or http://drupal.org/project/customfilter might be able to do it with their php filter but I've not used it personally) but then you'd have something along the lines of [calendar] that your users could have inside of a text field that would be transformed into the calendar view output on view.

Regardless of any of the above, I have no idea what CSS style issues you would have to fiddle with, if any, or what to do with the previous and next links of the calendar and if they would also work or not as expected on this new page.

2
  • Let me clarify then: The "other page" is a page on the site with other content. Several paragraphs of text. The request is to get the Calendar page to appear in the middle of all this text. Commented Apr 6, 2012 at 1:43
  • jimajamma's answer is good enough. Certainly that is one approach for certain situations. I started to research the views_embed_view function more and came across an excellent module which I had not yet come across which does precisely what I wanted. The module is called Insert View Commented Apr 6, 2012 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.