[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?

  • 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

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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