Click to See Complete Forum and Search --> : Displaying a list of data on multiple pages


KateKintail
08-28-2006, 09:17 AM
I have a list of names and associated websites that I want to display on a number of pages in my site. Currently, every time I have to add a new entry to the list I have to add it to every single HTML page where I have the list, which is annoying and leads to possible inconsistencies among documents.

I originally thought I might be able to make the list in a single XML document and import it into the HTML documents by binding it to a table. HOWEVER, many of my visitors use Safari and Firefox in addition to IE and the data is far too important not to be displayed for anyone. So I don’t think XML is the solution I’m looking for.

I have the ability to do php if there’s some sort of code that would work. Or maybe there’s an easier solution I’m overlooking.

Any suggestions would be greatly appreciated. Thank you!

metalman3d
08-28-2006, 12:32 PM
how's the data being stored? if it's just a text list, do a php include on your pages. Work out the html as you want it to display on the page in a separate file and call it on each page:

<?php include 'yourpage.php'; ?>

KateKintail
08-28-2006, 02:15 PM
I'm just starting out with PHP (I haven't done much more than form processing) so I'd never done an include before.
Works beautifully and looks great. Thank you so very much!!!! :)

metalman3d
08-29-2006, 11:57 AM
No prob... they're a great way to deal with headers, footers and navs since you only have to change them in one file and the change goes across the whole site.

KateKintail
08-29-2006, 03:29 PM
I can definitely see the benefits on the modular design & programming ease side! After implementing it yesterday, coincidentally I had to make a change to one of the list items and it took 10 seconds instead of 10 minutes running find & replace on 25 files and re-uploading them. So it's already making my life easier. :)

Do you happen to know if it works well with screen readers? it looks (from viewing the page source) that screen readers (for the blind) would read the information fine and not read the include code line instead. But do you know for sure/have any resources that might mention it?