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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Need Image link without the 'img src' tag

Go to End

2 Posts   987 Views


Community Member, 7 Posts

8 December 2011 at 12:39pm

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?



Forum Moderator, 4102 Posts

10 December 2011 at 4:12am


SilverStripe tips, tutorials, screencasts and more: