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   404 Views

Avatar
Slim-Jim

Community Member, 4 Posts

23 October 2012 at 6:12am

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

Forum Moderator, 922 Posts

23 October 2012 at 10:08am

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

Community Member, 4 Posts

24 October 2012 at 9:05pm

Thanks Sean,

Sounds like a little project for the weekend :-)