XML Parameters Common Usage Parameters are used in many places in Joomla!: All parameters have the following attributes: name - This is the field name of the parameter type - This is the element type for the parameter, text, a list box, etc label - The text label to be displayed in the parameter form description - The text that will display when you hover over the label default - The default value to use General Use Parameters definitions are made up of one params tag and one or more param tags, for example: <params> <param ... /> <param ... /> </params> The params tag can take the optional addpath attribute which is equivalent to calling $params→addElementPath() in the code. It should hold a full path relative to the site installation folder, for example: <params addpath="/components/com_contact/elements"> <param ... /> This allows any developer to define custom controls. Category List Selecting an Article category: <param name="catid" type="category" default="0" label="Category" description="An article category" /> Using the section (previously scope which is also still supported) attribute, you can select categories for other components: <param name="catid" type="category" section="com_weblinks" default="0" label="Category" description="A weblinks category" /> Editors Selecting one of the installed wysiwyg editors: <param name="editor" type="editors" default="" label="User Editor" description="WYSYWYG Editor for this User" /> Filelist <param name="file_name" type="imagelist" directory="/images/stories" filter="" hide_default="1" default="" label="Menu Image" description="PARAMMENUIMAGE" /> directory - the directory in which to list the files filter - a regular expression to filter on, eg: filter=”\.html$” lists all files ending with .html exclude - a regular expression to exclude files from the list, eg: exclude=”index\.html” will exclude the index.html file from the list, exclude=”^_” will emulate private files if you name them with an underscore prefix (eg: _my_private_template.html) 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 <param name="helpsite" type="helpsites" default="" label="Help Site" description="Help site for this User" /> Imagelist <param name="menu_image" type="imagelist" directory="/images/stories" hide_default="1" default="" label="Menu Image" description="PARAMMENUIMAGE" /> Languages <param name="language" type="languages" client="site" default="" label="Front-end Language" description="paramLanguage" /> List <param name="link_titles" type="list" default="" label="Linked Titles" description="Make the Item titles linkable"> <option value="">Use Global</option> <option value="0">No</option> <option value="1">Yes</option> </param> Menu Menu Item <param name="menu_item" type="menuitem" label="Menu Item" /> Radio <param name="cache" type="radio" default="0" label="Enable Cache" description="PARAMENABLECACHE"> <option value="0">No</option> <option value="1">Yes</option> </param> Section <param name="sectionid" type="section" default="0" label="Edit posts" description="Set the section to retrieve posts from" /> Spacer <param name="@spacer" type="spacer" default="" label="" description="" /> Text <param name="moduleclass_sfx" type="text" default="" label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" /> Textarea <param name="description_text" type="textarea" default="" label="Description Text" rows="5" cols="30" description="PARAMDESCTEXT"/>
|