SiteC Source Example
The following HTML-code corresponds to a typical "index.html" file
somewhere within a web site. The following SiteC-specific elements
are used:
<HTML>
<HEAD>
<TITLE>Example1</TITLE>
<META NAME="marker" CONTENT="example1">
</HEAD>
<BODY>
<H1>Example1</H1>
This is the list of all example documents:
[$ insert_toc]
<A HREF="#home">Go to Home</A>
<HR>
Generated
[$ insert_var($month)]/
[$ insert_var($day)]/
[$ insert_var($year)]
by SiteC V0.2.2.
</BODY>
</HTML>
- Design Template
The interesting is what you don't see: Use a design template
to concentrate on the content of your pages. Write your
design template once
and all of your pages will appear with the same outfit. For this
reason, there are no GIFs included here nor fancy table tags.
- <META NAME="marker" CONTENT="example1">
The <META>-variable defines a marker (label) for this document.
Other documents can refer to this label using the expression:
<A HREF="#sitec_markers">Link to Document</A>.
Using this feature, you can move your documents around without
having to update your HREFs every time. See below (HREF="#home")
for an example of how to define a reference to another file.
- [$ insert_toc]
Include the list of all documents in a subdirectory, sorted by
title or any other attribute.
This is extremely helpful for fast changing lists of documents
such as news or data sheets. Don't update you content twice, never
have dead links anymore. Advanced users can also define their
own kind of sophisticated indices. You can build a site map this
way, keyword indices or a global table of content.
- HREF="#home"
This is a symbolic reference to another file. Normally with HTML
3.2, such "marker references" have to be defined within the same
file. SiteC extends this mechanism to other files.
See above (Marker) for an example on how to define a link endpoint.
- [$ insert_var($month)]
Insert attributes into your
web site such as generation date etc.