Hello, and first of all thanks for making such a great tool! It's really fun to use and play with.
Now, here's my problem: I am trying to use a different image for the tablesort indicator in my theme, overriding the theme_tablesort_indicator() function. However, as I put the new function in my template.php and clear my cache, instead of getting the new png file, or even an image not found, I get nothing: not even an empty image tag. I spent a few hours looking for a solution, and I am at my wits' end on this.
I'm not a great programmer, not even a halfway decent one, so please speak slowly... It's not really a critical issue, but I like to do the little details in a theme, and I'd like to contribute it one day when I think it's good enough, so it would be nice to have a solution. Anyway, here's what I put into my template.php:
function desert_tablesort_indicator($style) {
if ($style == "asc") {
return theme('image', 'sites/all/themes/desert/images/arrow-asc.png', t('sort icon'), t('sort ascending'));
}
else {
return theme('image', 'sites/all/themes/desert/images/arrow-desc.png', t('sort icon'), t('sort descending'));
}
}
And this is what I get on the page:
<a href="/admin/build/path?sort=desc&order=Alias" title="sort by Alias" class="active">Alias</a>
A solution to my conundrum would be much appreciated.
Thanks,
Marc.
Comments
Add extra arguments
Old topic, but just had the same problem. The solution is very simple: add 2 extra arguments ($attributes and $getsize) to your theme() call.
If you enter a full URL, $getsize must be set to FALSE or nothing will be returned, see https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_im...