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.

General Questions

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

Linking and Windows


Reply

3 Posts   334 Views

Avatar
Slim-Jim

23 October 2012 at 6:12am Community Member, 4 Posts

Hi all.,

I'm using SS3 and loving it.
I have a question I hope someone might have the solution to.
I've selected an image in the CMS, clicked on link, select 'download a file', select the picture at full size, select open in a new window.
The question is, can I have it open the new page in a pop up sized window rather than the page opening as a full size webpage?

Avatar
Sean

23 October 2012 at 10:08am Forum Moderator, 921 Posts

Hi there,

The option to open the link in a new window simply adds target="_blank" to new links, as far as I know. This just opens a new tab in the users browser.

To have links open in a new window in a pop up sized window, you'll have to attach some Javascript to the page which targets any links and sets the pop up size, etc.

An example of code doing that can be found here: [url]http://www.quirksmode.org/js/popup.html[/url]

Sean

Avatar
Slim-Jim

24 October 2012 at 9:05pm Community Member, 4 Posts

Thanks Sean,

Sounds like a little project for the weekend :-)