有关Joomla!表单XML的使用方法和功能描述,请参考这篇文章:
我们看到每个param item都包含以下几项:
name - field 名称
type - field类型, text, a list box, etc
label - form中显示的标签
description - tooltip 显示的文字
default - 默认值
在一个params section可以书写多个 param
你可以在params处指定addpath,这个目录下放置自定义的element文件。(关于element的自定义我们另外说明)
Joomla! core中目前已经提供的element 类型包括以下几种:
文章分类选择列表
添加一个section 属性,你也可以选择其他组件的分类数据,比如下面的代码选择 weblinks的分类。
可视化编辑器:选择一个可视化编辑器
文件列表:
各参数定义如下:
directory - 文件列表的目录
filter - 过滤器,这是一个正则表达式
exclude - 排除文件,一个正则表达式
stripext - set to 1 to strip the file extension in the list
hide_none - set to 1 to hide the ‘Do not use’ list option
hide_default - set to 1 to hide the ‘Use Default’ list option
Helpsites
Imagelist
hide_default - set to 1 to hide an automatic Use Default entry in the list
语言选择
List
Menu
Menu Item
Section
Spacer
Text
Textarea
rows - the number of rows for the
cols - the number of columns for the textarea
我们最常使用的是 Text,Textarea,List,radio,hidden等