renderlet:*

 

This property-reference is applicable to all types of renderlets.

 

Reference

Go to Top

You can find here a short reference about all the common properties that can be used each renderlet.

 

path data type req def uobj description
namestring
  
   Identifier for the renderlet; unique accross all the application.
labelstring    Label, displayed close to the renderlet in default rendering.
Can be a litteral string, or a reference to a locallang string.

Example:
  1. <renderlet:TEXT
  2. name="myfield"
  3. label="LLL:EXT:myext/locallang.xml:myfield.label"
  4. />
titlestring    Mapped to the title HTML property.
classstring    CSS class definition that will be encapsulated with the corresponding HTML class-attribute in your renderlet.

Example:
  1. class="large"
stylestring    CSS style definition that will be encapsulated with the corresponding HTML style-attribute in your renderlet.

Example:
  1. style="border:1px solid silver;"
customstring    Will be inserted as-is inside the renderlet-tag.

Example:
  1. <renderlet:TEXT
  2. name="mytxt"
  3. custom=" rel='lightbox' "
  4. />
This will be rendered as:
  1. <input type="text" name="myformid[mytxt]" id="myformid.mytxt" rel='lightbox' />
wrapstring    Takes a piped wrap-string like TYPO3 likes it.
Wraps the renderlet with the given string.

Example:
  1. <div class="text">|</div>
defaultWrapboolean true  If false, the renderlet will not be automatically wrapped in the default <div> tag.
recombinestring    Recombine offers a chance to reassemble all the subparts constituting a renderlet in a different order.
Example, recombining a renderlet:TEXT :
  1. <renderlet:TEXT name="mytxt" label="Some text field">
  2. <recombine>
  3. <userobj>
  4. <ts><![CDATA[
  5. 10 = COA
  6. 10 {
  7.  
  8. 5 = TEXT
  9. 5.value < params.input
  10. 5.wrap = <div style='background-color: green;'>|</div>
  11.  
  12. 10 = TEXT
  13. 10.value < params.label
  14. 10.wrap = <div style='color: purple;'>|</div>
  15.  
  16. }
  17. ]]></ts>
  18. </userobj>
  19. </recombine>
  20. </renderlet:TEXT>

This is deprecated now, and avantageously replaced by the channeled-template technique.
processboolean true
  
If true, renderlet will be processed by Formidable. False, it will be skipped.
readOnlyboolean false  If true, the renderlet will not be editable.
renderOnlyboolean false  If true, the renderlet will be processed and rendered, but the datahandler will skip it.
Useful when you want to render a form-field that should not be inserted in the database.
activeListableboolean false  If true, the renderlet will be rendered as an editable form field when in lists (where, by default, renderlets are readonly).
dependsOnstring    Absolute name of renderlet, onto whom the current renderlet depends. For instance, if a listbox B depends on listbox A, B should declare dependsOn='A'.
hideIfDependancyEmptyboolean false  If true, the renderlet will be rendered as hidden (via CSS display: none) if it's dependancy is empty (as defined in /dependsOn).
validateForDraftboolean false  If true, the renderlet will have to validate even if the current form is submitted as DRAFT.
hideIfJsboolean false  If true, the renderlet will be rendered as hidden if Javascript is active on the client browser.
displayOnlyIfJsboolean false  If true, renderlet will be rendered as hidden if Javascript is not active on the client browser.
i18n/ : Placeholder for translation settings at renderlet level.
i18n/translateboolean true  If false, the renderlet will not be translatable (used in conjunction with /datahandler/i18n/use=true).
i18n/hideIfNotTranslatedboolean false  If true and not translated in the current language, renderlet will be rendered as hidden (used in conjunction with /datahandler/i18n/use=true).
data/
data/valuestring  
  
Always overrides the renderlet's value.
data/defaultValuestring  
  
Value of the renderlet when displaying form for the first time, and when not editing a record from the database (when in creation mode).
data/items : This property is used only when we have a control with multiple values.
data/items/fromTCAboolean false  If true, Formidable will look for items in the TCA definition for the table as defined in /datahandler/tablename (if datahandler of type DB), with a match on renderlet's name = TCA column name.
data/items/item
data/items/item/captionstring
  
   Caption for the renderlet's item. Can be an LLL reference.
data/items/item/valuestring
  
   Value for the renderlet's item.
search/ : This section is available when the renderlet has a renderlet:SEARCHFORM in his ancestors.
search/onFieldsstring  
  
Comma-separated list of columns to search on in the database.
If several column names are given, Formidable will perform the search in the several columns.
Note that when dealing with JOINt SQL datasources, you may as well provide column names prefixed by their table name.
search/modestring  
  
One of :
  • startswith,
  • orlike,
  • googlelike.



startswith: search only records starting with the posted value. With /search/onFields set to "title, keywords", the resulting SQL-clause will look like:
  1. AND (
  2. (title LIKE 'my search term%') OR
  3. (keywords LIKE 'my search term%')
  4. )
Combining startswith with a renderlet:CHOOSER results in a nice alphabetical-hash selector searchfield.


orlike: same as startswith, but this time the LIKE clause will not restrict the lookup to the start of the column. With /search/onFields set to "title, keywords", the resulting SQL-clause will look like:

  1. AND (
  2. (title LIKE '%my search term%') OR
  3. (keywords LIKE '%my search term%')
  4. )



googlelike: Formidable will explode the searched value on spaces, "AND" and the "+" (plus sign), and will look for values containing all the given substrings. With /search/onFields set to "title, keywords", the resulting SQL-clause will look like:

  1. AND (
  2. (
  3. (title LIKE '%my%') AND
  4. (title LIKE '%search%') AND
  5. (title LIKE '%term%')
  6. ) OR (
  7. (keywords LIKE '%my%') AND
  8. (keywords LIKE '%search%') AND
  9. (keywords LIKE '%term%')
  10. )
  11. )
search/overrideSqlstring  
  
Redefines the portion of SQL given by this renderlet to the SEARCHFORM to override the default SQL search clause.


Example, if checkbox checked, we will look only for christmas-related records:
  1. <renderlet:CHECKSINGLE
  2. name="xmasspecific"
  3. label="Display only Xmas specific items">
  4. <search>
  5. <overrideSql>
  6. <userobj>
  7. <php><![CDATA[
  8.  
  9. return "(xmasflag=1 OR (santaflag=1 AND eventdate='" . strftime("%Y") . "-12-25'))";
  10.  
  11. ]]></php>
  12. </userobj>
  13. </overrideSql>
  14. </search>
  15. </renderlet:CHECKSINGLE>
validators/ : A collection of validators.
events/ : Events can be set on a renderlet.
There are 3 type of events : server, ajax, client.
Example
  1. <renderlet:BUTTON name="redirect">
  2. <onclick runat="ajax">
  3. <userobj>
  4. <php>#![CDATA[
  5. return $this->majixSendToPage('http://formidable.typo3.ug');
  6. ]]#</php>
  7. </userobj>
  8. </onclick>
  9. </renderlet:BUTTON>
http://formidable.typo3.ug/features/event-handling.html
http://formidable.typo3.ug/features/event-handling-part-2.html
events/runatstring
  
   Type of event (serveur, client , ajax)
events/cacheboolean true  The default config for ajax events is to cache results return by server, so that when the same event is fired again, no ajax request is needed to execute the majix tasks.
For desactivate caching, set the tag at false.
events/paramsstring    Parameters of the event.
events/syncvalueboolean false  If true, the value of renderlets are updated.

Examples

Go to Top

TODO