Opening html page / template in lightbox?

I need to open a lightbox and show inside it an html page or template. I installed the fancybox plugin to create lightboxes, and this works fine for images.

However, I can not get any html files to show up inside it. What happens instead is that the html file shows up at the top of the main html page of the application, at the top of the page, above my nav bar. I can prevent this from happening by putting the content inside of Template tags, but then my lightbox opens with the same content of my main page instead of the template, and I cannot set the href to a template name as that returns an error.

How can I get html content to show up inside a lightbox using meteor js?

You can render template as html with Blaze or React:

var template = Template[<name>],
  content = Blaze.toHTMLWithData(template, {<template data>});
Lightbox.show(content); // this is just as examle
1 Like