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.

Template Questions /

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

How to call/show a template in a lightbox witohut the theme (plain/raw view)


Go to End


2 Posts   1999 Views

Avatar
kharmer

Community Member, 8 Posts

8 March 2013 at 5:07am

Hi all,

How would I call, from one template, another template inside a light box. And without the theme warapped around it?

I have a list page and a button to Add a new item and would like the page for adding new item to be displayed to user in lightbox from the listing page (to make workflow faster).

I tried searching but didnt have any joy finding what I needed! If anyone has some handy tips or references on the web I'd really appreciate them.

Best regards,
K...

Avatar
kharmer

Community Member, 8 Posts

12 March 2013 at 3:28am

OK, I implemented fancybox for the lightbox.

I then, on each lightbox link, added a param ?modal=1 and grabbed this from the page.php and used it to show/hide elements in the page.ss so that existing templates extending 'page' can carry on doing so but without the themes header and footer etc.

Hope this helps somebody with similar query.

K...