I see that you use alt and title on your blog http://teddy.fr/blog. How can I do that ?
I tried to use phptemplate_teaserthumbnail_thumbnail but with no success.
I used $thumbnail = theme('imagecache', $preset, $thumbnail, $node->title, $node->title, $attributes); but node->title it's empty.
$thumbnail = theme('imagecache', $preset, $thumbnail, $node->title, $node->title, $attributes);
I'm using the teaserthumbnail in views. Like here http://www.usgirl.org/american-girls
Any ideas?
Still talking alone... I find a minor workaround :
if (empty($this->options['preset'])) { $node->teaserthumbnail = $thumbnail; $node->type = $values->type; $thumbnail = theme('teaserthumbnail_thumbnail', $node); } else { $node2 = node_load($values->nid); // <-here $thumbnail = theme('imagecache', $this->options['preset'], $thumbnail, $node2->title, $node2->title, $attributes); //<-here }
It's messy I know and works only if you setup options['preset'] in views.
You could easily add the following function to your template.php file in your theme:
function phptemplate_teaserthumbnail_thumbnail($node, $attributes = NULL) { $thumbnail = $node->teaserthumbnail; // We define if we prepend a thumbnail to the teaser if (!empty($thumbnail)) { $preset = variable_get('teaserthumbnail_preset_'. $node->type, ''); $preset = empty($preset) ? variable_get('teaserthumbnail_preset', '') : $preset ; $thumbnail = theme('imagecache', $preset, $thumbnail, $node->title, $node->title, $attributes); } return $thumbnail; }
In the latest version of Teaser Thumbnail I have added "Thumbnail" as the default alt attribute and $node->title as the default title attribute.
Comments
Comment #1
idflorin commentedI tried to use phptemplate_teaserthumbnail_thumbnail but with no success.
I used
$thumbnail = theme('imagecache', $preset, $thumbnail, $node->title, $node->title, $attributes);but node->title it's empty.I'm using the teaserthumbnail in views. Like here http://www.usgirl.org/american-girls
Any ideas?
Comment #2
idflorin commentedStill talking alone...
I find a minor workaround :
It's messy I know and works only if you setup options['preset'] in views.
Comment #3
hunvreus commentedYou could easily add the following function to your template.php file in your theme:
In the latest version of Teaser Thumbnail I have added "Thumbnail" as the default alt attribute and $node->title as the default title attribute.