CruisEdit

Home
Download
Documentation
  Prerequisites
  Installation
  Users Manual
    Tags+Attributes
TODO
Known Issues
FAQ

Tags and Attributes

CruisEdit Tags are keywords included in <?ce and ?>. Some of them have attributes like HTML tags have. Additional some tags do have values by themselves (i.e. not only their attributes).

The ABSTRACT tag

Inserts the documents abstract here into the layout
Context: Layout
Sample:
<?ce ABSTRACT ?>

The AUTHOR tag

Inserts the author of the document. When used in a layout, it refers to the author of the respective document
Context:Layout, document.
Sample:
:
<?ce CONTENT ?>
<HR>
<ADDRESS>Contributed by: <?ce AUTHOR ?></ADDRESS>
</BODY>
</HTML>

The CONTENT tag

Inserts the document into the layout here
Context: Layout
Sample:
<?ce CONTENT ?>

The DATE_CREATED tag

Inserts the date and time of the documents creation. When used in a layout, it refers to the creation time of the respective document
Context:Layout, document.
Sample:
<?ce CONTENT ?>
<HR>
<ADDRESS>Created: <?ce DATE_CREATED ?></ADDRESS>

The DATE_MODIFIED tag

Inserts the date and time of the last modification. When used in a layout, it refers to the modification time of the respective document
Context:Layout, document.
Sample:
<?ce CONTENT ?>
<HR>
<ADDRESS>Last modified: <?ce DATE_MODIFIED ?></ADDRESS>

The EDIT tag

Inserts additional links when in edit mode. When used in a layout, the links denoted by "content" refer to the respective content document.
Value and Attributes:
LINK=
"edit:content"
insert link to edit the documents content
"fulledit:content"
insert link to edit the documents content in full edit mode
"clone:content"
insert link to clone (copy) the document to a new document. Especially usefull when displaying a list of document to create a new one and use one of the existing as template.
LABEL="..."
Use this to label edit links for this document instead of documents name/title
Sample:
<?ce EDIT LINK="..." LABEL="..." ?>

The HEADER tag

Includes some HTML elements that have to be placed in the HTML page header This won't affect the information displayed to the web sites visitor, but transports some meta information, e.g. to set up links in the browsers navigation bar in edit mode.
Sample:
<HTML>
<HEAD>
<TITLE>Sample Page</TITLE>
<?ce HEADER ?>
</HEAD>
<BODY>
:

The ICONLINK tag

Inserts an icon with a link to the corresponding document
Value and Attributes:
ICONLINK="..."
Path to the document to be linked. The icon should have the same path and the name of the document with an _i.jpg appended.
Sample:
<?ce ICONLINK="/foo/bar.html" ?>
will be replaced by
<A HREF="/foo/bar.html">
<IMG SRC="/foo/bar.html_i.jpg"
     ALT="[Bild:Foo Bar]"
     TITLE="Foo Bar">
</A>
provided "Foo Bar" is the name of the document /foo/bar.html

The INCLUDE tag

Includes other documents
Sample:
<?ce INCLUDE="/CruisEdit/index.html" LAYOUT="layout/cruisedit" EDIT_ROWS="20" EDIT_COLS="80" ?>
Value and Attributes:
INCLUDE="..."
Specifies the document to be included here.
LAYOUT="..."
Specifies the layout to be used here. Overrides layout referenced in documents meta information
(optional)
EDIT_ROWS="..."
Specifies the number of rows to be used for the HTML field when doing inline editing.
(optional)
EDIT_COLS="..."
Specifies the number of columns to be used for the HTML field when doing inline editing
(optional)

The INCLUDELIST tag (<= CE 0.5.6)

In some cases, you have a varying number of small documents that you would like to inlcude all in the main page without editing the main page each time you add or remove one of the small documents. In this case, you should give all the included documents a virtual path within the same virtual directory, e.g. /CruisEdit/sample.html, /CruisEdit/sample1.html and . To include them, instead of the syntax shown above you use
<?ce INCLUDELIST="/CruisEdit/%.html"?>
If you want only the 4 most recent documents, you can add the number 4 separated by a comma:
<?ce INCLUDELIST="/CruisEdit/%.html,4"?>
(This changes from version 0.6.5 to 0.6.6)

The INCLUDELIST tag (>= CE 0.6.6)

In some cases, you have a varying number of small documents that you would like to inlcude all in the main page without editing the main page each time you add or remove one of the small documents. In this case, you should give all the included documents a virtual path within the same virtual directory, e.g. /CruisEdit/sample.html, /CruisEdit/sample1.html and . To include them, use the INCLUDELIST tag.
Value and Attributes:
INCLUDELIST="..."
Pattern to match. Depends on storage, currently MySQL syntax is required which means "%" as placeholder for arbitrary (sub)strings.
LAYOUT
EDIT_ROWS
EDIT_COLS
See INCLUDE tag
MAX="<number>"
Maximum number of items to show. Default is to show all.
(optional)
SORT_BY="[-]<col>"
MySQL column to use for sorting. If a "-" is prepended, the sort order is reversed.
(optional)
Sample:
<?ce INCLUDELIST="/CruisEdit/%.html" MAX="4" ?>

The LAYOUT tag

Layout class to be used. Currently this is just a prefix or postfix to or a replacement of the layout path. This may either become more sophisticated in the future or be dropped.
Value and Attributes:
CLASS="..."
postfix, prefix or replacement to be used when building effecitve layout path from path given in documents meta information. If the string starts with a dot ".", it is appended, if it ends with a slash "/", it is prepended. In any other case, it replaces the layout path.
(mandatory)
Sample 1:
<?ce LAYOUT CLASS="box/" ?>
will prepend a box/ to the layout path.

Sample 2:

<?ce LAYOUT CLASS=".box" ?>
will append a .box to the layout "filename".

The MODULE tag

Invokes an module and inserts the output here
Value and Attributes:
MODULE="..."
name of the module to call
<var>="..."
Variables passed to the module
Sample:
<?ce MODULE="calendar" YEAR="2006"?>
To get an idea, how modules may be written, have a look at library/ce_mod_sample.inc in the CruisEdit distribution.
[ Read the source, Luke ;-) ]

The NAME tag

Inserts the name of the document. When used in a layout, it refers to the name of the respective layout.
Sample:
<H2><?ce NAME ?></H2>
<?ce CONTENT ?>

The REF tag

Adds $ce_prefix (or $ce_edit_prefix respectivly) from config.php to the documents path, thus building the full URL path of the document referenced by the CruisEdit internal path.
Value and Attributes:
REF="..."
path of the document to be referenced
Sample:
<?ce REF="/doc/index.html" ?>

The TITLE tag

Inserts the name of the document referred to by the URL.
Sample:
<HTML>
<HEAD>
<TITLE><?ce TITLE ?></TITLE>
</HEAD>
<BODY>
:

The URL tag

Builds the URL path of the http request to show the page currently displayed.
Sample:
<?ce URL ?>

Provided by usr-local