class M7embedExtension < Radiant::Extension
version “1.0”
description “Allows you to embed other sites in Radiant”
url “”
def activate
EmbedPage
end
def deactivate
end
end
and a model embed_page.rb:
class EmbedPage < Page
tag ‘embed_page’ do |tag|
require ‘open-uri’
open(tag.attr['url']).read
end
end
The issue I am running into is that generally the application I am
trying to
load has relative references, and when it is embedded, it assumes
everything
is coming from the embedding page, and not the application… can anyone
suggest how to remedy this?
You might be better off with an IFRAME or something similar, otherwise
you will have to create a bunch of workarounds in your Rails application
to deal with a different HTTP_REFERER.
The other option, of course, is to fuse Radiant with your application,
i.e. making your application into an extension, but that may not be
appropriate.
The issue I am running into is that generally the application I am
trying to
load has relative references, and when it is embedded, it assumes
everything
is coming from the embedding page, and not the application… can anyone
suggest how to remedy this?