Cyclone3 Skin


From Cyclone3 Wiki

(Redirected from Service type)
  • Extension: *.type (see Naming conventions)
  • Location: _type directory
  • Mandatory: yes at least '' must exist
  • Caching: not cached

A type defines a specific content layout. To clear this out, let's set an example. You are building a simple site, with a few page display possibilities - a frontpage (header, menu, top news item and a few news), news subpage (header, menu, news list), news article (header, menu, article) and contact (header, menu, contact article, contact form). All of these specify a contextual layout of a single page. The actual type file looks like this:

<!CMLTYPE type:name="Cyclone-Markup-Language" type:version="1.0" type:cp="UTF-8"!>

<CONF_VAR id="body" value="default" />

<ADDLAYER id="default" />

  <VAR id="-type" value="dmdl" />
  <VAR id="-global" value="2" />
  <VAR id="-category" value="21" />
  <VAR id="-name" value="section-article" />
    <VAR id="-TMP" value="CONTENT-CENTER" />

  <VAR id="-type" value="smdl" />
  <VAR id="-category" value="401" />
  <VAR id="-global" value="2" />
  <VAR id="-name" value="article_view" />
  <VAR id="-version" value="lite" />
    <VAR id="article.ID_entity" value="<$main::FORM{'ID_entity'}>" />
    <VAR id="a501_image_file.ID_format.1" value="5" />
    <VAR id="view_TMP" value="ARTICLE" />
    <VAR id="view_xsgn_global" value="2" />
    <VAR id="discussion_TMP" value="RELATED-DISCUSSION" />
    <VAR id="discussion_add_TMP" value="RELATED-DISCUSSION-ADD" />
    <VAR id="discussion_xsgn" value="article" />
    <VAR id="related_TMP" value="RELATED-ARTICLES" />
    <VAR id="related_xsgn" value="article-related" />
    <VAR id="related_xsgn_global" value="2" />

<ADDLAYER id="rightboxes" />

This type loads a default body template, default Layer with included module definitions, an article XHTML layout designmodule and a supermodule which loads an article view module, related discussion module and related articles module.

Mostly, you need one type for one site page, however, if you need two different article listing subpages, one for news and one for press releases, you don't need to create a new type for each one. You can customize the existing type by specifying configuration keys, to choose an article category, which will be displayed - hence reuse an existing article list.

To use a specific content layout for a sitemap node, open the node editor and choose the type you want to use. If you don't find a suitable one, have a look at how to add a new service type.