Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » NewWindow DOM Action

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: 887 Views
  • Gene
    Avatar
    Community Member
    41 Posts

    NewWindow DOM Action Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: NewWindow DOM Action Link to this post

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

  • Gene
    Avatar
    Community Member
    41 Posts

    Re: NewWindow DOM Action Link to this post

    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.

  • Gene
    Avatar
    Community Member
    41 Posts

    Re: NewWindow DOM Action Link to this post

    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.

    887 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.