Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

[warning: Views newbieism ahead...]

I've got a View working with the FullCalendar module, which shows items from one of my content types in the calendar. The title of the item appears in the calendar on the day specified by the "target date" field; all of this is working fine. I now want to change the string that shows up in the calendar from the title of the item to something different, which I'll work out based on the item being shown in the view.

This is a matter of theming, I presume. I've defined a template file called views-view-field--fullcalendar--field-target-date.tpl.php in my theme's template folder. Some dsm() statements in this file confirm that it is getting picked up by the Views system, and its $row and $view variables have appropriate values. But nothing that I do in this file changes what's presented in the view -- I thought print "something" would do it, but it doesn't; I've tried setting the passed-in $output and other values to something on the hope that they would magically find their way back to some code that would print them, but again without luck.

So I seem to be in the right place -- what do I have to do to change what gets displayed on the page?

share|improve this question
    
I've also found that I can leave the contents of my theming tpl.php file completely empty and still get the items' titles in the calendar. This suggests to me that something else altogether is going on, and I have no clue what it is. –  Jim Miller Dec 15 '12 at 1:33
add comment

1 Answer

I seem to have stumbled into something that works:

In the Views control panel for my Calendar view, I went down into Format > Settings > Customize Fields, and clicked the "Use a custom title" checkbox. After I did this, the system started paying attention to views-view-field--fullcalendar--field-target-date.tpl.php, and used whatever I printed as the title of the events in the calendar.

So far, all is well, although I'm not sure whether this is an inherent part of the Views system per se, or if it has something to do with the module's use of the fullcalendar jQuery plugin. Other solutions/answers/explanations are of course welcome.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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