API15

JParameter/render

From Joomla! Documentation

< API15:JParameter

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Render

[<! removed edit link to red link >]

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

Syntax[edit]

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[edit]

string HTML

Defined in[edit]

libraries/joomla/html/parameter.php

Importing[edit]

jimport( 'joomla.html.parameter' );

Source Body[edit]

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[edit]

Code Examples[edit]