Question

I'm a newbie to Wed Design, using Dreamweaver CS5.5 (and infinite amounts of Googling) to try and create a small Intranet site for the small business I'm working for. I'm trying to create a 'News' page where the news page will look for a "News_Item.htm". My thinking is that the Marketing guy can create an article in word then save as htm and my page will look up the file and insert it into the page. So I have a folder callled content and the htm file resides in there. In my code I insert

<!--#include file="content/Group_News_Item.htm" -->

This has two effects; 1. Marks several tags as "Invalid Markup" Markup invalid because it's an overlapping or undisclosed tag (I know the Include File has done this because if I remove that line of code the errors disapear). 2. The jpeg within the Group_News_Item.htm does not display in the browser although there is a space where it should go and the accompanying text does display. If I move the Group_News_item.htm to the root and amend the include file it solves the missing Jpeg but still has the Invalid Markup errors.
I am very open to suggestions, perhaps I should scrap this approach if there is a much better way of going about this task? Due to my inexperience I'd like to keep it as simple as possible.

Was it helpful?

Solution

Make sure your #include is not outside the html tags.

also, do you have a server?

Check if you server-side includes (SSIs) enabled.

Alternative way is to use something like php which is also serverside, this would be like this:

<?php

    include('content/Group_News_Item.htm');

?>

to do this, you have to have 1 of these servers to run it on, testing server on your computer like WAMP (for windows) and LAMP (for linux) or linux webhosting

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top