Actions

API15

JParameter/render

From Joomla! Documentation

< API15:JParameter
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Render

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

render($name= 'params', $group= '_default')
Parameter Name Default Value Description
$name 'params' The name of the control, or the default text area if a setup file is not found
$group '_default'

Returns

string HTML

Defined in

libraries/joomla/html/parameter.php

Importing

jimport( 'joomla.html.parameter' );

Source Body

function render($name = 'params', $group = '_default')
{
        if (!isset($this->_xml[$group])) {
                return false;
        }
 
        $params = $this->getParams($name, $group);
        $html = array ();
        $html[] = '<table width="100%" class="paramlist admintable" cellspacing="1">';
 
        if ($description = $this->_xml[$group]->attributes('description')) {
                // add the params description to the display
                $desc   = JText::_($description);
                $html[] = '<tr><td class="paramlist_description" colspan="2">'.$desc.'</td></tr>';
        }
 
        foreach ($params as $param)
        {
                $html[] = '<tr>';
 
                if ($param[0]) {
                        $html[] = '<td width="40%" class="paramlist_key"><span class="editlinktip">'.$param[0].'</span></td>';
                        $html[] = '<td class="paramlist_value">'.$param[1].'</td>';
                } else {
                        $html[] = '<td class="paramlist_value" colspan="2">'.$param[1].'</td>';
                }
 
                $html[] = '</tr>';
        }
 
        if (count($params) < 1) {
                $html[] = "<tr><td colspan=\"2\"><i>".JText::_('There are no Parameters for this item')."</i></td></tr>";
        }
 
        $html[] = '</table>';
 
        return implode("\n", $html);
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />