Sei sulla pagina 1di 3

This document helps with building templates on Cassea.

This is an example of Cassea's template:

<?xml version='1.0' encoding='utf-8' ?>


<root extends="/admin/base.xml">
  <block id='content'>
  <WDataSet>
  <model>materials</model>
  <classname>Materials</classname>
  <datasource method="dsList" >
  </datasource>
  </WDataSet>
  <WDataHandler forms='fmaterials'>
  <model>materials</model>
  <classname>Materials</classname>
  <handler method="dhDelete"/>
  </WDataHandler>

  <WCSS>
  .partners_btn{
  float:right;
 }
  </WCSS>
  <WBlock class="content_block contact">
  <WForm id='fmaterials' method='POST'>
  <WRoll id='materials_list'>
  <WBlock class='photo_side'>
  <WImage id='img' /> 
  </WBlock>
  <WBlock class='txt_side'>
  <WText h='2' id='title'/>
  <WHyperLink id='edit' class='btn'>редактировать</WHyperLink>
  <WButton id='del' class='btn' value='удалить'/>
  </WBlock>
  </WRoll>
  </WForm>
  </WBlock>
  </block>
</root>

You can add different attributes to widgets respectively to html tags attributes.

Here you can see analogs of widgets with html code.

Widget Html Analog Description


Styles
Defines a section in a documen
can add text style as attributes
<WText> <span>
make paragraphs, bolded or ita
text , etc.
<WBlock> <div> Defines a section in a documen
<WStyle> <style> Defines a style definition
<WFieldSet> <fieldset> Defines a fieldset
<WText p='1'> <p> Defines a paragraph
<WText h='1'> <h1> Defines header 1 to header 6
<WText i='1'> <i> Italic text style
<WText b='1'> <b> Bold text style
<WText br='1'> <br> Inserts a single line break

Included files or codes


<WCSS> <css> Insert css code to html page
<WJavaScript> <script type="text/javascript"> Insert a JavaScript in an HTML
<WHTML> Includes an html file

Tables
<WTable> <table> Defines a table
<WTableHeader> <th> Defines a table header
<WTableRow> <tr> Defines a table row
<WTableColumn> <td> Defines a table cell
Lists
<WList> <ul> Defines an unordered list
<WListItem> <li> Defines a list item
<WList type='numeric'> <ol> Defines an ordered list
Widgets wrapped in wroll widge
repeated several times. Numbe
<WRoll>
times and source for inside wid
are taken from dataset
Links
The <a> tag defines an anchor
anchor can be used in two ways
To create a link to another docu
<WHyperLink> <a> by using the href attribute
To create a bookmark inside a
document, by using the name
attribute
Images
<WImage> <img> Defines an image
Objects
<WObject> <object> Defines an embedded object
Input
<WForm> <form> Defines a form 
<WButton> <button> Defines a push button
<WInput> <input> Defines an input field
<WCheckbox> <input type='checkbox'> Checkbox input
<WRadio> <input type='radio'> Radio Input
<WHidden> <input type='hidden'> Hidden Input
<WFile> <input type='file'> File Input
<WTextArea> <textarea> Defines a text area
<WFlash>
<WSelect> <select> Defines a selectable list
<WSelectOption> <option> Defines an item in a list box
Spinner for increasing and decr
<WSpinner>
numbers in input
<WMarkdown> Markdown Text Editor
<WColorPicker> Color picker to choose color
<WCAPTCHA> CAPTCHA for antibot form subm
Checkers and filters for inputs o
<WValueChecker>
form
Cassea features
<WRuler> Pagenator for elements on the
A link with automatic src =  pre
<WBackLink>
page 
<WNavigator> Page navigator
Source code for parametres to
<WDataSet>
implemented to widgets
<WDataHandler> Source code for form submition

Potrebbero piacerti anche