Sample XML Layout

First Block XML

<xml version="1.0" encoding="utf-8">
<component>
  <name>Hello3</name>
  <creationDate>June 2009</creationDate>
  <author>My Code Spark</author>
  <copyright>GNU/GPL</copyright>
  <authorEmail>sales@websparkdesign.com</authorEmail>
  <authorUrl>http://www.mycodespark.com</authorUrl>
  <version>1.0</version>
  <tablePrefix>hl</tablePrefix>
This section allows you to define the initial variables for the Component and XML file.

Controller Definitions

  <controllers>
    <controller>category</controller>
    <controller>item</controller>
  </controllers>
Define all desired controllers

Model Definitions

  <models>
    <model name="item">
      <fields>
        <field type="varchar" length="255">name</field>
        <field type="float" validate="numeric">price</field>
        <field type="text">description</field>
      </fields>
    </model>
  </models>
Define your models in the same manner. Note that models have "fields" inside of them.

Model Level Variables

plural: Allows for definition of plural form (eg. categories)
has_many: Links a different model and creates a one-to-many relationship
belongs_to: Links to a different model and creates a many-to-one relationship
has_and_belongs_to_many: Links to a different model and creates a many-to-many relationship
special_fields: Pre-defined fields by Code Spark (eg. created_by, modified_by...)
hide_view: Hides the view from Joomla! menu manager (Boolean)

Field Definitions

...
    <fields>
      <field type="varchar" length="255">name</field>
      <field type="text">description</field>
    </fields>
  </model>
...
Fields are located between the <model> and </model> tags

Field Level Variables

type: MySQL Type (eg. varchar, text, int, float, boolean...)
length: MySQL Field Length (Only applicable to certain types eg. varchar, text, int)
validate: Joomla! validation (required, numeric...)
label: User friendly name (eg. Category Name, spaces allowed)
identifier: Denotes the field that is the primary field and clickable in list view (Boolean)

Download the sample XML file here. Please remember this file is for demonstration purposes only and may not contain all available fields.
This page outlines most of the functions and features of the system. However, it is recommended that you download the sample XML to see a more comprehensive and complete list of available fields and their usage.

Download Sample XML
Built by WebSpark Design