Hello, I use WebLinks module with Image_attack to assign an image for each link.

All is perfect but I would remove the link to node from my image (original size).
This is the code for the image_attach:

<div class="image-attach-body" style="width: 150px;">
<a href="/content/mylinks">
<img class="image image-_original " width="150" height="150" title="My Node" alt="My Node" src="http://myserver.com/sites/default/files/images/links/myimage.png"/>
</a>
</div>

I would remove < a href= "" >...< /a >

How can I solve my issue?

Any help is appeciated.

Thanks

Comments

joachim’s picture

Status: Active » Closed (duplicate)

Yeah this is a big flaw in the module.
Already reported here: #445074: Add a theme function for the attached image block..

johnmullin2003’s picture

Status: Closed (duplicate) » Fixed

Thanks joachim.
sorry for duplicate, I browsed previous issues but I didnt' find your linked post. ;-)

Do you plan this add-on feature in your next releases?
(maybe a radio button-- > "Yes, link image to node", "No, dont link")

thanks again, bye

jM

joachim’s picture

No, not a UI option, but better theming functions for easier overriding.

dpellerin’s picture

I created a simple function with a regex that parses the string and simply returns the image tag portion. Throw it in your template.php and call it from your node.tpl.php file (or wherever)

function returnImageTag($tag){
    if(preg_match("/<img.*\/>/", $tag, $matches)){
        print $matches[0];
    } else {
        return $tag;
    }
}

Dana

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.