Web pages often need to share common content. For example, web pages
might share a common
menu, set of features or news box. Using only copy and paste, it can be
painful to ensure that each web page has the same exact menu or other
shared features.
This is where 'include' comes in. Using the ECEn XML,
you can create a small XML file containing only your shared
content, for example, a left menu. You can
simply 'include' this file on each of the XML web pages need this content.
So, when you need to change the shared content, the change is reflected
automatically in all of the ECEn XML web pages which included the file.
To include chunks of XML from other files in the ECEn Web XML, we're going to use
<include> tags.
These instructions assume that you already have an ECEn XML web page
to edit and know at least a bit about XML. Most content, such as text, links, lists, pictures etc., belongs in the
<content> portion of your page; check the instructions below to see if you need to make sure that you
have a page with a
<content> portion. If you need a quick tutorial or
just a simple starter web page download, check out the
'Howdy, World' Tutorial where you can get a brief overview of what files you need to set up a basic
ECEn XML web page.
If you need an example, have a look at the
Includes Example page. You can view the XML source in your browser by clicking the 'this XML' at the bottom of the page (but note that this will show the XML file
after all the including has already been done. To see the individual XML pieces, try the 'see other formats' link).
Or, the XML source is located in the Common Tasks Downloads to the right. (Right click, Save Link Target As...)