1

I'm using the TimeField module with a custom theme (a subtheme of the Bootstrap theme) and I want to change how the output is rendered.

There's a timefield.tpl.php file located at

sites/all/modules/timefield/theme/timefield.tpl.php

which I want to modify copying it to

sites/all/themes/my_theme/templates/

but when I do so the copy is ignored and the original file is loaded instead.

I'm a Drupal newbie but I like to learn, so any advice or link to a resource to understand where the problem lay is fine.

  • clear cache for site – monymirza Mar 27 '13 at 5:40
  • Thanks for the suggestion, but it didn't work – Proteo Mar 27 '13 at 6:14
1

Create tpl file for field field--field-name.tpl.php. place it to your theme.

if Field name is: field_page_photos
then File name will: field--field-page-photos.tpl.php

copy sites/all/modules/timefield/theme/timefield.tpl.php code to above tpl file. make changes and clear cache.

| improve this answer | |
  • Cheered too soon... the new template loads OK, but there is a $time variable that is no longer recognized. Any advice? – Proteo Mar 27 '13 at 6:34
  • create an issue at drupal.org – monymirza Mar 27 '13 at 7:03

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.