HTML-Based Pages

Html-based pages is the most common type of page. They usually have file suffixes like html, asp, php or the like. Thanks to the general character of Consolo’s functionality, you design the pages any way you want. This page will tell you what you need to know about “content” tags, search paths and xhtml.

 

“Content” Tags

Static files with an htm or html suffix don’t require any adjustments, but server generated files (e.g. asp and php files) require that specific “content” tags are inserted into the code.

<!--content name="main"-->
<!--/content name="main"-->

 

These tags tell the Editor what part of the code that is editable. A page can contain several different editable regions:

<p>This text cannot be edited</p>
<!--content name="1"-->
<p>This text can be edited</p>
<!--/content name="1"-->
<p>This text cannot be edited</p>
<!--content name="2"-->
<p>This text can be edited</p>
<!--/content name="2"-->

 

Note that you can rename the tags by changing the name within the quotation marks. It is however important that you always have a start and end tag with the same name.

Server generated pages that don’t have “content” tags will not be editable.

Note! Place the tags in such a way that the risk of an editor removing them by mistake is as small as possible. A good idea is to place the tags outside an editable div.

 

Search Paths

Since all the pages in Consolo can be moved between different folder-levels on the server, and since they can be moved to Consolo’s system folder /fileversions and be shown there, it is absolutely forbidden to use relative search paths. This goes for everything from images and links to style sheets and included scripts.

 

This is OK:

<img src="/images/myimage.gif">
<img src="http://www.mycompany.com/images/myimage.gif">

 

This is NOT OK:

<img src="images/myimage.gif">
<img src="../images/myimage.gif">
<img src="myimage.gif">

 

If you in the future will be moving the entire web site, download it first to your local hard drive. Then use a more advanced code editor, for instance HomeSite,or UltraEdit to perform a search and replace on all the search paths in all the files before you upload them to the new location.

 

Xhtml

Consolo can generate fully validating and well structured xhtml code. For this to work, you need to do three things:

 

1. Begin the code in every page with a !DOCTYPE tag. For instance, like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

2. Make sure that you write all the code on all the pages in correct xhtml format. This is especially important for the code that lies outside the “content” tags since Consolo can’t reach that code and “fix it up”.

 

3. In the configuration for the web site, make sure that the setting Generate Correct Html/xhtml is set to 1.