Hi there,
I have video_cck installed and this module using static "See Video" text as thumbnail's TITLE and ALT properties. I have changed the module and intead of "See Video" text it should show node title ($node->title).
I am using these thumbnails in views.
When I use view with "Full nodes" and "Teaser List" view types the image title is shown correctly.
When I use view type "Bonus: Grid view" image title is blank.
When I using $node->nid as image title in all these 3 view types it shown correctly.
I have to use "Bonus: Grid view" view type because all I have to show in this view is list of thumbnails. Why in "Bonus: Grid view" view type the $node->nid is shown correctly and $node->title not. How can I solve the problem?
Thanks.
Comments
Comment #1
platypus media commentedThis is because when you output $node->title, you're not outputting the raw text from the title. You're creating the
<h2 class="title">tags, the<a>tags that link it back to the node, etc. If you want to set the image title to $node->title, you're going to have to do a little bit of theme work in your views-myview.tpl.php file to create a variable for it to put into your<img title='<php print $mytite ?>' alt=...>tag.Comment #2
dima700 commentedWhen I choose "Full nodes" and "Teaser list" view types I have no problems.
Only when I choose "List View" or "Grid view" I have a problem.
In "grid view" type the html code that generated for cell where the image is shown is:
As you can see alt="" title=""
This part of code generated by video_cck module:
where ALT and TITLE defined in module as:
Comment #3
sunSorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.