tags:

views:

28

answers:

4

HI

I would like to have latest news/updates in the homepage of my website but i don't want to have to change the HTML code every time i want add a new news line or make a change, is there anyway i can make a file that i can just edit and when the homepage is rendered it retrieves the information for the news widget from the file?

thanks

forgive me if i got something wrong or phrased the question wrong but its the first time i have done anything like this.

A: 

Mo, the best way to do this would be with a language such as PHP, .NET, etc that will allow you to dynamically pull content for your site from a database. A basic content management system of sorts. Once done, updates are incredibly quick...but building or installing them can take time. Short of a full-blown database, you could build a system to talk to XML, SQLite, or even a text document.

Along the lines of the CMS, basic applications like WordPress can be made into excellent website CMS systems. There's boatloads of tutorials on getting started with Wordpress, Joomla, and the like.

At the simplest level, you could create a separate HTML page with just the content for the changing portion and include in your main page via iFrame.

bpeterson76
A: 

Not using pure HTML there isn't, or if there is, I'm not aware of it.

You'll be wanting to introduce some webscript or javascript to your page. If you were using PHP you might use an include. Or javascript you might want to parse an XML file and load it using AJAX or similar.

DavidYell
A: 

Hi, It's can be done by html include. The nice article about different way's of html include: link text

Good like.

Boris
A: 

you can store a HTML file in S3 and retrieve that file and using JavaScript to display the contents of the file onload.

just thought id mention just incase it might help someone.

Mo