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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

use $image as an image url? [SOLVED]


Go to End


3 Posts   2865 Views

Avatar
nicknick

Community Member, 15 Posts

18 February 2013 at 12:01pm

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
(deleted)

Community Member, 473 Posts

18 February 2013 at 12:27pm

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

Avatar
nicknick

Community Member, 15 Posts

18 February 2013 at 12:44pm

perfect, thank you