I am in a pickle.
I could easily solve this problem with PHP or a CMS, but I don’t have access to these because of the restrictions of the client’s server. So, I need to make due without it.
I have a collection of articles, with related videos and pictures, that need to be displayed on multiple pages. So, let’s say ‘John’ wrote an article about Dalmations. His article needs to show up on the ‘John’ page, as well as the ‘Dogs’ page, and also on an ‘All Articles’ page.
How should I go about doing this?
I could copy and paste the html, but then if I wanted to make a change, I would have to change it on several different pages.
So, my current—and lame—solution to throw the article in an html document, and then put iframes on the ‘John’ and ‘Dog’ page. This has a host of problems including the inability to resize iframes based on the contained content. There has to be a better way.
I’ve searched as best as I could, but haven’t come up with anything. Would it be better to use XML and iframes? jQuery / AJAX? I really just don’t know what the best option is.
Thank you.
You could make some simple build tooling. For example in the past ive used
rake,phing,ant, or something custom on some projects that needed to run as static html. This allows me to keep thing separate like you would on a dynamic project and then compile them down to static html files.Id recommend doing this over using client side calls.