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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Embedded HTML


Reply


2 Posts   1147 Views

Avatar
remarkable

1 Post

3 October 2007 at 3:28pm

Edited: 03/10/2007 3:41pm

Just wondering about ways to embed SS variables in HTML.
I'm doing the following:

<% control Days %>
   <span><img src="$DayNo.png"/></span>
<% end_control %>

$DayNo is my variable, and I have several .png pictures (1.png, etc) to display. I know the . is for method calls, so is there any way to avoid this?

EDIT: Found the answer: curly braces.
<img src="{$DayNo}.png"/>

Avatar
Willr

Forum Moderator, 5513 Posts

3 October 2007 at 4:16pm

Yes {} is the way to go. don't forget your alt tags on your images :D