I'm a complete novice to Web Design and have been tasked to build a small Intranet site for the small Business where I work.
I'm trying to create a Company News page so that the Marketing guy can create an article in Word, possibly with or without accompanying pictures, and then save it to a location as *.htm file. Then my News page will call the article and place it in the Div that holds the space for the article.
I've tried both HTML File include and php include but every time I insert the include line of code it invalidates the surrounding set of tags with "Invalid Markup" & I lose any functionality within that tag such as positioning, formatting etc. I know it must have something to do with the fact its a htm file because it works if the file is .txt. I'm trying to give the person creating the original document some functionality by using MS Word and avoiding them sending it to me to upload there's a new article to publish.
I've trawled through the Internet for a solution for two days now with no luck
. The closest I've come to an explanation is that the *.htm file converted from *.docx file will have html, headings & body tags so the page gets confused as you can't have two sets of these?
I suspect this is a very common task with any website and I wasn't expecting it to have casued me so many issues. So If anyone has a workaround or a suitable alternative I would be delighted to hear from them!
Simple Summary of what I'm trying to achieve;-
Thanks
Well then I guess what's happening IF Word is converting the .doc file to htm then its forming bad code which would be a result of why you are getting the invalid code.
Why not just include a very simple CMS into the site so your end user can update it?
You say you are losing any positioning 'within' the include tag. How do you know what's in that tag if your not creating it?
I mean if you have this:
<?php include ('file.htm'): ?>
You don't know whats in the file.htm if your not the one who is creating it so how can you position anything within it?
Of course you could mean that the page just gets screwed up as a result of something outside of your control in the file.php document?
osgood_ wrote:
Well then I guess what's happening IF Word is converting the .doc file to htm then its forming bad code which would be a result of why you are getting the invalid code.
Why not just include a very simple CMS into the site so your end user can update it?
Is that easy enough to implement? Any recomendations for a CMS?
Yup, http://grabaperch.com/ is quite easy. It will cost £35 for a one off licence though BUT its about as simple as it gets or you could try something like http://www.cushycms.com which I belive is FREE for a maximum of 5 sites.
Cushy is hosted on their servers so there is really no set up that you need to get involved in. Perch is self-hosted so you will need to set that up.
Cushy demo:
Thanks for the links but It looks a bit like overkill for my small, basic internal Intranet site & I cetainly wouldn't get any authorisation to spend any money (no matter how small the amount). I'm only interested in end users being able to update content for one news page at the moment.
So I guess I'm back down to two options;
or
2. Get the users to send news articles to me for editting and uploading (I was trying to avoid getting involved in day to day content updates).
Are there any other formats that could be 'Saved As' from Word which might be compatible perhaps?
supersub70 wrote:
So I guess I'm back down to two options;
- Ensure the News articles are Text based only. Then have a separate image palceholder where any accompanying images can be uploaded.
or
2. Get the users to send news articles to me for editting and uploading (I was trying to avoid getting involved in day to day content updates).
Are there any other formats that could be 'Saved As' from Word which might be compatible perhaps?
Both those options would work. I don't know enough about Word to provide an answer to your last query. Maybe someone else will take up the reigns and suggest an alternative method.
Have you considered parsing an XML file into your webpage? Word could export XML very well and this XML can be configured to be parsed by all browsers in .html files.
Start here: http://www.w3schools.com/xml/xml_to_html.asp
North America
Europe, Middle East and Africa
Asia Pacific