MegaSack DRAW - This year's winner is user - rgwb
We will be in touch
I am trying to create a website that has text and image content read from a file. Not really sure where to start or what to google so any pointers would help. Ideally I want a file full of all the content that is then loaded to the website. Is this possible/easy?
So the file would look something like:
PageTitle1 = "This is page 1"
Content1 = "Lots of text about something"
Image1 = "/images/pitureofahorsey.jpg"
and the index.html would very very roughly be
< h1 > PageTitle1 < /h1 >
< p > Content1 < /p >
< img > Image1 < /img >
to look like this on the website
[b]This is page 1[/b]
Lots of text about something
[img]
[/img]
Is this just a one-off or is it that you're almost trying to create your own content management system, to separate the content and the layout??
Rachel
trying .. to separate the content and the layout
I suppose I am trying to do that. The idea is that you just edit the content file and everything else stays the same
IN that case, it's all possible but so is re-inventing pencil sharpeners - why do it when someone has already spent a lot of time on it and done a really good job?
Seriously, you will benefit from having a look at a Content Management System, let's say WordPress. Learn how that works and it will pay back a thousand times.
www.wordpress.org
(I actually use a different CMS, www.drupal.org, but I'm told WordPress has a quicker learning curve)
Rachel
I want to know why that horse has its head stuck in a tree!
is it dead ?
wordpress
joomla
drupal
all do this much better than you will ever be able to.
So is it hard? Using something as complex as wordpress seems like overkill. I only really want a file with the layout in html and a file with the content, txt or xml or something. A bit more googling seems to imply it is tricky and need PHP and mySql. I'd have though it would be simpler as is it is with programming in C and just using 'include'
Not sure about the horse. Probably hungry or stupid or both.
yeah, you would need PHP as a minimum. doubt you'd need mysql, maybe to store the tags?
Yes, you would need both php and mysql. It I'd worth it though and virtually every hosting company out there will supply those anyway.
You're right; you could it it much more basically but these tools exist for a reason - flexibility. Youre bound to want to do that one little extra thing one day that a custom coded solution just won't let you do without a lot of work.
Rachel
wordpress
joomla
drupal
Will these work locally served without an internet connection?
PHP would be easy enough.
But yes, don't re-invent the wheel, it'll be rubbish.
Yes, you can certainly use Drupal without an internet connection - that's how I work on the train if I'm building something. I have a version of Drupal (I use the Acquia all-in-one package at http://network.acquia.com/downloads) and it allows me to work on my Macbook just as though I was at work.
We also have some Drupal websites on our private network at work.
Rachel
If your on a Windows platform, you can use XAMPP to run stuff locally.
HTML + XMLhttp://www.w3schools.com/XML/tryit.asp?filename=tryxml_display_table
Thanks. This looks promising. Just written a very basic version of what I want so I'll have a bit more of a play. Shall look at the existing options, too
