Jump to:

22983 Posts in 11764 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » use $image as an image url? [SOLVED]

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

Page: 1
Go to End
Author Topic: 463 Views
  • nicknick
    Avatar
    Community Member
    15 Posts

    use $image as an image url? [SOLVED] Link to this post

    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

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: use $image as an image url? [SOLVED] Link to this post

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

  • nicknick
    Avatar
    Community Member
    15 Posts

    Re: use $image as an image url? [SOLVED] Link to this post

    perfect, thank you

    463 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.