API15

Difference between revisions of "JParameter/render"

From Joomla! Documentation

< API15:JParameter
(New page: ===Description=== Render <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Descript...)
 
m (preparing for archive only)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JParameter/render|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JParameter/render}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
Line 77: Line 77:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JParameter/render|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JParameter/render}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
  noresultsheader=\n
 
  noresultsheader=\n
 
  category=render
 
  category=render
 
  category=JParameter
 
  category=JParameter
  category=CodeExample
+
  namespace=CodeExample
 
  category=MethodExample
 
  category=MethodExample
 
  include=*
 
  include=*
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Latest revision as of 20:01, 24 March 2017

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]