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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

use $image as an image url? [SOLVED]


Reply

3 Posts   618 Views

Avatar
nicknick

18 February 2013 at 12:01pm Community Member, 15 Posts

Hi all, i need a little help, i have a custom page.ss and i am including images from the db that are chosen in the admin section.
eg.
$Photo.SetWidth(104)
$Photo1.SetWidth(104)
$Photo1.SetWidth(104)

Now i want to use a lightbox script to show these in a light box
eg
<div class="content">
<div class="gallery">
<ul class="images">
<li class="image"><a title="" rel= "$model" href="$photo1"> <img src="$Photo1.SetWidth(104)"></a></li>
</ul>
</div>
</div>
any ideas how this can be done, i have tried escaping the "'s with \'s but still not working.
thanks in advance
Nick

Avatar
simon_w

18 February 2013 at 12:27pm Forum Moderator, 474 Posts

<a title="" rel= "$model" href="$Photo1.URL"> $Photo1.SetWidth(104)</a>

Avatar
nicknick

18 February 2013 at 12:44pm Community Member, 15 Posts

perfect, thank you