Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there a way to override calendar-day-node.tpl.php so that different views use different templates?
I have multiple calendars on my site that have very different content, and require a bit more flexibility in presentation than the Views UI allows.
For other types of views, customizing the Row style output template allows for the flexibility and granularity I need. The calendar-day-node.tpl.php appears to be performing that function in calendar day views, but it's not listed in the view's theme information.
Comments
Comment #1
jesss CreditAttribution: jesss commentedI was able to accomplish this by copying calendar-day-node.tpl.php to my theme directory and adding a switch statement. While this works, the resulting code is a bit hard to read, and could be confusing to the next person who has to work on this site.
I think it would be much cleaner and simpler (not to mention more intuitive and user-friendly) if these templates used a similar naming convention as other views templates to allow for specific templates for specific views.
Comment #2
solide-echt CreditAttribution: solide-echt at Solide BV commentedThe 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.