07/03/2015 at 8:54 am
#339425
Keymaster
@ Studio Collective
Almost 9000… I expect to be over 10000 by end of year!
Yes this could easily be done in the template code. The only “gotcha” would be if someone assigned a link to either the image or logo by accident. You would end of a link within a link which would be invalid.
I think the code would be like this (untested):
$href = $entry->getPermalink();
$image = $entry->getImage( array( 'return' => true ) );
printf( '<a href="%1$s">%2$s</a>', $href, $image );
Unfortunately, after looking at my code, the necessary filters do not exist so that this could be done with the Code Snippets plugin. The make this update “safe-ish” you could follow the instructions in this QuickTip.
Hope that helps!
