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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

NewWindow DOM Action


Go to End


4 Posts   1240 Views

Avatar
Gene

Community Member, 41 Posts

1 May 2010 at 4:15am

Would it be possible to add a new DOM Action to open a new window? I want to be able to 'preview' an item from the DOM and a Popup is too small as it's a full HTML page (like the 'Published Site' and 'Draft Site' links work).

Thanks,

Gene

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 May 2010 at 4:45am

public function customDOMActions()
{
return new DataObjectManagerAction(
'Title',
'SomeURL',
'popup',
'/path/to/icon.png'
);
}

Avatar
Gene

Community Member, 41 Posts

1 May 2010 at 6:09am

I was looking for a new window, not a popup. ie. target="_blank". Previewing a full HTML page in a popup doesn't work well.

Avatar
Gene

Community Member, 41 Posts

1 May 2010 at 8:35am

Edited: 01/05/2010 8:36am

Sorry, let me provide a little more context for this one. I have a DOM full of Invoices. Currently, in order to preview an HTML invoice, you have to edit the Invoice and click a 'Preview' link. The link opens a new window to show the fully rendered HTML invoice (similar to what clicking the 'Published Site' link does in the CMS). I was hoping to be able to add a DataObjectManagerAction so users could just click on a 'Preview' button instead of having to edit the record first. A popup is too small to show the full invoice.