By somes on
I've checked out the lullabot method of theming the read more link works great
//get the structured links
$links = $node->links;
$links['node_read_more']['title'] = t('change me');
print theme('links', $links);
but can any one suggest how I can put replace the text with an image directly put in img tag doesnt work
//get the structured links
$links = $node->links;
$links['node_read_more']['title'] = t('<img src="temp.gif"/>');
print theme('links', $links);
Comments
CSS
What about using CSS to modify the class read-more? Drupal automatically applies that class to the 'read more' link. You could try a combination of
background,content,width... to get an image instead the text.Yes you can do this easily
Yes you can do this easily for the read more but I eventually would like to add images to link for categories links also, might be able to add ccs there also but the while process would be cleaner at the source, if I can change it that is.
Problems with other languages
Somes, the codes you stated works in English but if i try another language such as khmer or thai unicode, it will appear only squares. Any suggestions to make it work in others languages ?
Thanks in advance...
try looking
try looking at
http://www.kinetasystems.com/blog/theming-the-links-variable-in-drupal-n...
I havent done much with localisation - Have you tried using a conditional ie
if language == english
then
links =*****
if language == thai
then
links =****$$$