<?php

/* Smarty version 2.6.12, created on 2006-02-26 17:42:27
   compiled from C:/web/helloworld/helloworld/modules/examples/widgets/radios.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'WFDynamic', 'C:/web/helloworld/helloworld/modules/examples/widgets/radios.tpl', 8, false))), $this);
?>
<p>This page demonstrates the use of radio buttons in conjunction with WFDynamic.</p>
<p>A WFRadioGroup is a meta-widget and is never used directly in template files. The WFRadioGroup is solely to provide a single interface to the programmer for accessing the value represented by an arbitrary number of WFRadio's. In this example, the WFRadio's are created dynamically by the WFDynamic widget.</p>
<p>The use of this setup allows for the dynamic, automatic creation of radio buttons based on items in an array in your model. It is a powerful capability, requiring minimal setup. See the WFDynamic docs to read about all of the options.</p>
<p>You will notice that some minimal coding is required for this setup. This is required to tell the WFDynamic where to get the values for the each radio's label and value represented.</p>
<p>NOTE: the parentFormID property is currently named poorly. It really just means "parent widget" and will be changed in the future. Don't let it confuse you.</p>

<?php 
echo smarty_function_WFDynamic(array('id' => 'radios'), $this);
?>


<?php 
echo '
<hr>
<h3>.tpl file</h3>
<pre>
{WFDynamic id="radios"}
</pre>
    
<h3>.instances file</h3>
<pre>
$__instances = array(
	\'radios\' => array(\'class\' => \'WFDynamic\', \'children\' => array()),
	\'radioGroup\' => array(\'class\' => \'WFRadioGroup\', \'children\' => array()),
if ($this->_sections['peeps']['show']) {
    $this->_sections['peeps']['total'] = $this->_sections['peeps']['loop'];
    if ($this->_sections['peeps']['total'] == 0) {
        $this->_sections['peeps']['show'] = false;
    }
} else {
    $this->_sections['peeps']['total'] = 0;
}
if ($this->_sections['peeps']['show']) {
    for ($this->_sections['peeps']['index'] = $this->_sections['peeps']['start'], $this->_sections['peeps']['iteration'] = 1; $this->_sections['peeps']['iteration'] <= $this->_sections['peeps']['total']; $this->_sections['peeps']['index'] += $this->_sections['peeps']['step'], $this->_sections['peeps']['iteration']++) {
        $this->_sections['peeps']['rownum'] = $this->_sections['peeps']['iteration'];
        $this->_sections['peeps']['index_prev'] = $this->_sections['peeps']['index'] - $this->_sections['peeps']['step'];
        $this->_sections['peeps']['index_next'] = $this->_sections['peeps']['index'] + $this->_sections['peeps']['step'];
        $this->_sections['peeps']['first'] = $this->_sections['peeps']['iteration'] == 1;
        $this->_sections['peeps']['last'] = $this->_sections['peeps']['iteration'] == $this->_sections['peeps']['total'];
        echo smarty_function_WFDynamic(array('id' => 'personInfo'), $this);
        ?>
<br />
<?php 
    }
}
?>

<hr>
<p>Pagination is quite simple with PHOCOA. The WFPaginator class provides an interface to paged, sorted data. The data access is delegated to a class implementing WFPagedData. PHOCOA ships with WFPagedData implementations to provide paging for PHP arrays, Creole queries, and Propel criteria-based queries. It takes only a few minutes to convert any list view to support paging and sorting. Typically you need add only 4-6 lines of code to your module and configure several widgets for the GUI. A variety of widgets are available that provide navigation, current page info, and sort links that provide user interface for the the pagination system. The pagination system is compatible with forms as well, so if the data you're accessing is the result of a form-based query, you can have the pagination system interface with your form (via javascript) to provide paging that works seamlessly with the results of a form submission.</p>
<p>This example uses MODE_URL, which is the non-form mode. <a href="<?php 
echo smarty_function_WFURL(array('page' => 'exampleWithForm'), $this);
?>
">Click here for a MODE_FORM example.</a></p>

<?php