Include HTML from another server in a CMS page?

This forum is for Web Developer Network members who are participating in the effort to implement and deploy an open source content management system at UNL.

Include HTML from another server in a CMS page?

Postby Erin Paseka » Mon Jun 04, 2012 10:27 am

Anybody know a way to include a chunk of HTML in a CMS page if that HTML file resides on a different webserver? I wanted to use "include virtual" but apparently that only works when both pieces are on the same server.

Context: We have a few dozen Grad Program Summary pages; they're important and they get a lot of our hits. For purposes of uniformity, validation, and aggregation, their data and layouts are maintained elsewhere and scripts generate .shtml files as needed. In the good old frontier era, I just downloaded those .shtml files and uploaded them to frontier. In the CMS era I'm stuck.

I'm dreaming up lots of approaches, none of them really workable:
- Copy and paste generated HTML into CMS pages. Doable for a few, but updates are frequent and a layout adjustment would mean doing 80 in a row. Prohibitively tedious.
- Have the generated .shtml files reside on the other server, with CMS pages linking to them. They wouldn't be sufficiently integrated into the main CMS site unless I also had a way to make them share the CMS site's navigation, etc. (Redundantly building the nav on the other server is just going to get things out of synch.)
- Generate .html "sub" pages that reside on the other server, then include those in CMS "shell" pages for good site integration. Sounds good but I can't "include virtual"/"include file" across servers, iframes are no good for liquid height, and I don't know what else to try.
- Generate .html "sub" pages, upload them to the CMS, and include those in CMS "shell" pages. I can upload a .html file to the CMS but I can't get "include virtual" to work in the CMS. Also pretty impractical without a batch upload.

Any suggestions? (I've asked a couple people directly but got a handoff from one and no acknowledgement from the other. I understand being busy but I'm getting crunched here too.)
Erin Paseka
 
Posts: 147
Joined: Tue Jul 13, 2004 3:02 pm
Location: Graduate Studies

Re: Include HTML from another server in a CMS page?

Postby smeranda » Fri Aug 31, 2012 1:02 pm

This now works in UNL CMS. To include the HTML from another file, use:
Code: Select all
<!--#include virtual="http://wdn.unl.edu/" -->
Seth Meranda
User Experience Architect
University Communications
(402) 472-8513
seth@unl.edu
smeranda
 
Posts: 111
Joined: Tue Apr 05, 2005 2:34 pm
Location: University Communications

Re: Include HTML from another server in a CMS page?

Postby Erin Paseka » Fri Aug 31, 2012 2:06 pm

Yeah, I probably about fell out of my chair at the WDN meeting when they announced it. Too late to spare me from the initial "death by copy & paste" workaround that I had to use to get that set of pages moved to the CMS before the frontier clock ran out, but better late than never, and already saving me from hours of further copy & paste for updates. Very glad to have this working.
Erin Paseka
 
Posts: 147
Joined: Tue Jul 13, 2004 3:02 pm
Location: Graduate Studies


Return to CMS Implementation

Who is online

Users browsing this forum: No registered users and 0 guests

cron