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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Linking and Windows


Go to End


3 Posts   910 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: http://www.quirksmode.org/js/popup.html

Sean

Avatar
Slim-Jim

Community Member, 4 Posts

24 October 2012 at 9:05pm

Thanks Sean,

Sounds like a little project for the weekend :-)