3

I am using D7 and view3 (beta). I created a view named employee with a template for the field first_image, views-view-field--employee--page--field-first_image.tpl.php. When I rescan the theme information, this template became bold. It worked fine (When clicking the image, a slim box will show).

But I inserted this view in a basic page using insert view2.x dev module with tag [view:employee]. But this time my template file doesn't show and seems to be broken. How can I solve this?

2
  • Hello, there is no a grid template? are you using a custom grid template?. Also, seems that you can fix some CSS rules to fix your issue.
    – cigotete
    Commented Aug 26, 2011 at 14:41
  • I am using unformatted list format. Commented Aug 29, 2011 at 7:11

1 Answer 1

3

First you define a specific display in your template: views-view-field--employee--page--field-first_image.tpl.php.

Then you don't specify a display in your insert tag, making it fallback to default.

To fix your problem you need to either strip the display part of your template name or specify a display in your tag, like [view:employee=page].

I would probably go for the first solution, so your theming targets all possible displays of that view, but how you do it really depends on your implementation.

1
  • It worked for me!! Thanks a lot Tobias Sjösten... :) :) Commented Sep 5, 2011 at 9:55

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.