Actions

J1.5

Difference between revisions of "Using the core parameter types"

From Joomla! Documentation

Line 71: Line 71:
 
To return the parameter in PHP, use:
 
To return the parameter in PHP, use:
 
<pre>
 
<pre>
$this->params->get('ParameterName')
+
$params->get('ParameterName')
 
</pre>
 
</pre>
  
To return the parameter in html, use:
+
To return the parameter in html (specific to templates), use:
 
<pre>
 
<pre>
 
<? php echo $this->params->get('ParameterName') ?>
 
<? php echo $this->params->get('ParameterName') ?>
Line 81: Line 81:
 
To use the parameter as a conditional in PHP, use the variable above above with PHP conditional statements as shown below:
 
To use the parameter as a conditional in PHP, use the variable above above with PHP conditional statements as shown below:
 
<pre>
 
<pre>
if($this->params->get('cPanelPermissions') == [insert string or integer here]) {
+
if($params->get('cPanelPermissions') == [insert string or integer here]) {
 
     [Do something]  
 
     [Do something]  
 
};
 
};
 
</pre>
 
</pre>
  
To use the parameter as a conditional in html, use the variable above above with PHP conditional statements as shown below:
+
To use the parameter as a conditional in html (specific to templates), use the variable above above with PHP conditional statements as shown below:
 
<pre>
 
<pre>
 
<?php
 
<?php

Revision as of 14:38, 19 January 2008