Posted by bobmct on November 7, 2011 at 8:32pm
Drupallers:
I'm trying to create a views2 output that contains an image along with various text fields. In views2 I've noticed that I seem to have lost the templating feature (views-view-{view_name}.tpl.php) which previously did all the formatting for me.
What is the technique to stack the field output to the right of the left-aligned image? I've been trying to use all the formatting options found within views2 without much success. I even tried to create a unique class to tie to the view, again without luck. If interested please look at this link: http://staging.law.uconn.edu/faculty_list
Any ideas, pointers for a frustrated drupaller?
Thanks - Bob

Comments
That's odd - I'm using
That's odd - I'm using views-view--{view_name}.tpl.php and it's working fine for me. (It does need the double-hyphen before the view name).
On re-checking, I'm having
On re-checking, I'm having trouble too with view-specific templates - having more luck with theming individual views fields. Have you tried using "rewrite output" for the image field, and adding a "style='float:left'"? Just a thought ... Or set the view Style to "Table" and then you can align the text fields in a column to the right of the image, and use CSS to fine-tune the table layout.
Bob, on further testing I was
Bob, on further testing I was able to get the view template to work. I had to do two things:
1 - replace underscores in the name with hyphens
2 - include the display type of the view (i.e. block, page, etc.)
So I was able to theme the page display of a view named "Member_News" by creating a template named "views-view--Member-News--page.tpl.php". I tried it with a template named just "views-view--Member-News.tpl.php" and it did not work.
Follow up to suggestions...
Thanks for your testing and posting, Nick.
This morning I did the following and still am NOT 'hooking' to these templates:
view name "Faculty_list"
In my sites/all/themes/local/{themename}/ directory I have created the following files:
views-view--Faculty_list--page.tpl.php (exact view name)
views-view--Faculty-list--page.tpl.php (view name with - in lieu of _)
views-view--faculty_list--page.tpl.php (view name in all lower case)
views-view--faculty-list--page.tpl.php (lower case again with - in lieu of _)
and within each template file I've inserted a comment with its name such as:
etc so I could view_source and "see" which one was being used.
Results: NADA.
I also checked the view and other than the default it only has a "page" output.
Unfortunately I have dozens and dozens of such custom templates and none of them are being used.
Any other ideas/suggestions??? And thanks a million for you assist. Bob
Click 'Theme: information'
When you are looking at the view click on the link labeled 'Theme: information'. That will give you the exact filenames that you can use to override each tpl file.
Learn more at iRolo.net.
The second one
The second one (views-view--Faculty-list--page.tpl.php) is the format that worked for me. I did have to clear the cache before Drupal loaded the new template - but then it worked fine.
The second one
The second one (views-view--Faculty-list--page.tpl.php) is the format that worked for me. I did have to clear the cache before Drupal loaded the new template - but then it worked fine.
The Third one
The third(views-view--faculty_list--page.tpl.php ) is the format that worked for me. I did have to clear the cache before Drupal loaded the new template - but then it worked fine.
FYI
Just keeping the loop up to date. I have already searched and tried the names in the theme:information prior to posting but thanks for the reminder anyway.
Also, I have tried every iteration of the template names specified to no avail. And I did clear not only the Drupal cache(s) but my own browser's as well each time. Perhaps my 6.22 is somehow broken. I will keep digging at this as there has to be a logical answer. But thanks for everyone's help anyway.
Hi, I can't see the page, so
Hi, I can't see the page, so I'm not sure if this is already set.
I don't have access to the tpl files when I'm working on the sites, I have been using the Semantic Views module. Here's our write up and there's a nice video tutorial by Adaptive Themes http://drupal.yale.edu/books/drupal-how-guide/semantic-views
When trying to create a view like you describe, I either put it in the table style, or use Semantic Views to apply classes to the image. Then I assign the appropriate css to the class to get it to line up right. Just another way to go about it.
Nancy Flowers-Mangs
So I guess I'm not the only one experiencing this pain!!!
Thanks to all who have helped with advice and suggestions. I AM getting closer to resolving this issue. And while researching further yesterday I came across an article that describes the exact issues I'm having and I thought I would share for anyone who might be interested (and for some who already know what it's like):
http://www.advantagelabs.com/drupal-colonoscopy-or-how-theme-cck-field-d...
Enjoy!