Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Add Image to Template with an ID


Reply


3 Posts   1481 Views

Avatar
spierala

Community Member, 80 Posts

24 November 2009 at 6:51am

hello all,

i´m successfully adding an Image to my template using

<% control myStartImage %>
$Image
<% end_control %>

I would like to give that image an ID for replacing it with the help of jquery. Is this possible?

many thanks for your help,
florian

Avatar
Double-A-Ron

Community Member, 604 Posts

25 November 2009 at 4:29pm

Edited: 25/11/2009 4:31pm

<% control myStartImage %>
<img src="$URL" id="image_{$ID}" />
<% end_control %>

The id can be whatever you like of course. I just used a string with the $ID value as I knew it would definitely be there. The curly braces will seperate any string suffix or prefix from the template variable.

Aaron

Avatar
spierala

Community Member, 80 Posts

30 November 2009 at 10:09pm

Hey Aaron!

Thanks! I see there are serveral ways to include an image! Works great that way!

Greetz,
Florian