Home Documentation Developer Docs Creation of Content Elements
Creation of Content Elements PDF Print E-mail
Written by Ivo Apostolov   
Thursday, 26 April 2007 00:44

The idea behind the content element definition is an abstract, non programming definition of the table structure and logical information about any extention.

Even more, with these generic definitions the component developer does not need to think about multi lingual information or multi lingual translations at all. He just needs to provide a valid content element with his distribution and the end user can use this.

Each of the files within the directory: /administrator/com_joomfish/contentelements contain one description for a particular component table.

Since Joom!Fish 2.0 there is a naming convention for the content element files within this directory. Each of the files must have the same name as the table you like to translate.

XML structure of a content element

This example shows the content element file of the content component included in the core:

<?xml version="1.0" ?>
<joomfish type="contentelement">
<name>Contents</name>
<author>A. Kempkens</author>
<version>1.7</version>
<description>Definition for the core content component</description>
<reference type="content">
<table name="content">
<field type="referenceid" name="id" translate="0">ID</field>
<field type="titletext" name="title" translate="1">Title</field>
<field type="text" name="title_alias" translate="0">Title Alias</field>
<field type="htmltext" name="introtext" translate="1">Introtext</field>
<field type="htmltext" name="fulltext" translate="1">Fulltext</field>
<field type="created_date" name="created" translate="0">Created</field>
<field type="modified_date" name="modified" translate="0">Modified</field>
<field type="checked_out_by" name="checked_out" translate="0">Check out by</field>
<field type="checked_out_date" name="checked_out_time" translate="0">Check out date</field>
<filter>c.state >= 0</filter>
</table>
</reference>
</joomfish>

 

 

Table definition

The XML tag reference describes the defintion of the table and how it should be used. When you assign the content element to a specific table, you should know that the perfix should not be included.

The following list shows possible field types:

Field typedescribtion
referenceid The field that is used to refer to the original content. Normally this is the primary key of your table
titletext This is equal to the inputbox tag in HTML, but marks the field as a title
text This is equal to normal inputbox tag in HTML
textarea This is equal to the normal textarea tag in HTML
htmltext This is textarea with WYSIWYG Editor launched
created_date The date of creation of the item
modified_date The date of last of modification of the item
checked_out_by Who was the latest user who checked out the item
checked_out_date The date when the item was checked out
 

0 Comments

Add Comment

Joom!Fish 2.0 RC download

Selected Contributors

From the Joom!Fish Core team (Alex, Geraint, Ivo & Robin) a big thank you to all the people of the JoomFish community!
Special thank's for testing, good suggestions, translations and forum moderation to:

  • Tommy White for the cute logo design
  • Bernhard, Michael, Luc, Olivier, Robin, Rune, Akarawuth
  • Harri <aka tassu> for moderation

Recommended Reading

Buy Joomla! 1.5 with directshopper