Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Need Image link without the 'img src' tag

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 666 Views
  • Snowlord
    Community Member
    6 Posts

    Need Image link without the 'img src' tag Link to this post

    I'm trying to add the ability to insert an image into the background of a div. I have my CSS:

    <style type="text/css">
       .mainBackground {
       background: #000 url('$BackgroundImage') no-repeat left top;

    And added the proper tab into the php page:

    $fields->addFieldToTab("Root.Content.Images", new ImageUploadField('BackgroundImage', 'Background Image'));

    Everything functions as expected EXCEPT, it adds in the '<img src' tag (as it should). Is there a way to have the same functionality, only JUST insert the actual image path WITHOUT the 'img src' tag or the 'alt' tag?


  • UncleCheese
    4085 Posts

    Re: Need Image link without the 'img src' tag Link to this post


    SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

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.