The Core

Why We Are Here => Web Development => Topic started by: Gurtie on July 06, 2012, 10:26:32 AM

Title: creating html ppages from dynamic content
Post by: Gurtie on July 06, 2012, 10:26:32 AM
i don't know if this is really not possible or I'm just not explaining myself clearly to one of our developers. I can't see how its not possible so.....

a new site which the owners wish to run from a CMS. It will be created in multiple languages, each of which needs to be hosted in the appropriate country.

So far so good, but of course with a licensed CMS this has cost implications.

On the understanding that opensource is off the table, I suggested that we may be able to take the dynamic output from the CMS for the remote sites, copy them as flat html files and upload this content to the individual servers, thus avoiding having to run the CMS on each server. I know this removes large parts of the benefit of the CMS (and is probably morally reprehensible) , but in fact these sites will be updated about once every 6 months, there is no ecommerce to worry about, so the extra effort to hit a button called 'create flatfiles', ftp them somewhere and check the 30 page remote site is ok isn't going to be that high for any territory manager.

So the answer is apparently "impossible". I'm pretty sure I can scrape and republish a CMS built site without anything especially complex on it, so why can't it be done on a more formal basis? or am I going mad?


Title: Re: creating html ppages from dynamic content
Post by: Rooftop on July 06, 2012, 10:30:53 AM
Definitely possible. Obviously though dependent on what your devs can get your particular CMS to do though. 

If they REALLY can't get the CMS to do it you could always publish each to some hidden location and have a separate script scraping and copying to a new location.  I'd imagine there are people here with the code to do that already, but would never have considered having rights to the content!
Title: Re: creating html ppages from dynamic content
Post by: BoL on July 06, 2012, 10:47:15 AM
Yep, definitely possible. Even scraping the public facing side rather than using some programming would amount to the same output.

If they're just small sites then the WGET cheatsheet would help them here... about 10 lines of PHP could use the WGET command and FTP/SFTP the files over to their final resting place.
Title: Re: creating html ppages from dynamic content
Post by: Chunkford on July 06, 2012, 11:35:40 AM
Would something like this help to create a clearer picture for your devs? http://expressionengine.com/user_guide/cp/sites/ or http://www.alterian.com/wcm/our-product/cme/multi-site
Title: Re: creating html ppages from dynamic content
Post by: Gurtie on July 06, 2012, 12:09:54 PM
thanks all :) That link doesn't work for me chunkford.....

we use .net but an hours research shows there are loads of .net capable cms's that can output flat html - they may not be suitable for other reasons but they prove I'm mot entirely deranged!

I think this is a case of someone deciding on the best CMS for other reasons without thinking about the hosting side of the requirements, and then only thinking about what that does as standard - I have, erm, rephrased my question so that I think its clearer what I mean now and it seems to be getting people at least considering the alternatives, many of which we have some experience with anyway....

TFI friday. I'm counting the hours this week!
Title: Re: creating html ppages from dynamic content
Post by: nffc on July 06, 2012, 08:27:08 PM
I'm interested in this and most likely not helping but...

>each of which needs to be hosted in the appropriate country.

Why?
Title: Re: creating html ppages from dynamic content
Post by: littleman on July 07, 2012, 01:48:26 AM
Sure it could be done.  Depending on the setup the big hurdle  may be the internal link structure of the CMS.  I've just recently had to archive a 100k page forum that sat in a cgi-bin and had crazy dynamic URLs.  The link logic was very difficult for the regular site rippers to follow.  Yet the URLs were parse-able so I was able to plug in the logic to navigate the website.

So, what I ended up doing was building a script that mimicked static URLs by pulling pages and then translating the links on the page so that they would be rewritten statically.  I then used .htaccess in a subdirectory to internally redirect all page requests to this script.  The exact same approach could be done on a separate server, or even a home computer because the script calls the pages remotely.  This worked pretty well and when I was done the URLs looked a lot like how they look here in the core.  So, all that was just to get myself something spiderable.  After that it was easy to rip these pages using wget and save them as static.  This is probably more information than needed, but its just an example of how it was done in this case. 
Title: Re: creating html ppages from dynamic content
Post by: ergophobe on July 07, 2012, 08:07:44 PM
I've got to ask, what advantage are you getting from a CMS if you're not actually using it as such?

In other words, why not just use some templated WYSIWYG editor for them?

Also, you might find this interesting reading...

http://www.webmasterworld.com/content_management/4413562.htm
Title: Re: creating html ppages from dynamic content
Post by: Gurtie on July 08, 2012, 07:45:58 AM
>> each of them needs to be hosted

>> why not just use

Ok - here we're edging into the fun that is agency life and client relationships :)

The hosting is specced by the client, I believe on the advice of their SEO consultant. I'm going to recommend that the hosting is actually not on a per country basis but but grouped - so European domains in Germany, Austrolasian somewhere in Asia, etc although probably Chinese in China given what I've seen of the great wall issue. Local hosting for country specific sites does sound sensible to me though if budget and hassle allows - is that not what you've found? Its not something I've looked at in much depth for a couple of years.....

In any case its a client requirement so we can recommend otherwise but we have to be able to meet it and have the costs worked out for comparison purposes.

Re why a CMS - I am not a part of the tech team and thus don't get a vote :). I probably just earned myself a month on the naughty step by saying what I did so I'm not pushing things any further!
Title: Re: creating html ppages from dynamic content
Post by: jetboy on July 08, 2012, 08:42:41 PM
There's an episode of Webmaster Radio's Strikepoint from August 2011 with Kristjan Mar Hauksson on it. IIRC, he seemed to have a well thought out strategy for managing multi-language sites.
Title: Re: creating html ppages from dynamic content
Post by: Rumbas on July 09, 2012, 11:22:01 AM
Multilingual is something we've worked on/with for many years. Let me know if you want any pointers?
Title: Re: creating html ppages from dynamic content
Post by: Gurtie on July 09, 2012, 11:26:44 AM
This is interesting, seperate from this question - shall we start a multilingual/multiregion thread?