I seem to be stuck again within my for each loop, I don't have the error anymore for my arry but it will not display anything within the page.
//code within my Model class
public function getAllProcessors()
{
$rows = $this->fetchAllKeyed("SELECT * FROM `xf_api` ORDER BY `api_title` ASC", 'api_id');
$i = 0;
$values = array();
foreach($rows as $value)
{
$values[$i]['api_id'] = $value['api_id'];
$values[$i]['api_title'] = $value['api_title'];
$values[$i]['api_active'] = $value['api_active'];
$values[$i]['api_currency'] = $value['api_currency'];
$values[$i]['api_recurring'] = $value['api_recurring'];
$i++;
}
return $values;
}
//controller actionIndex...
public function actionIndex()
{
$viewParams = array( 'api' => $this->_getModel()->getAllProcessors() );
return $this->responseView('API_ViewAdmin_API', 'api', $viewParams);
}
//template
<xen:title>{xen
hrase api_title}</xen:title>
<xen:require css="filter_list.css" />
<xen:require js="js/xenforo/filter_list.js" />
<h2 class="subHeading">
{xen
hrase api_header}
</h2>
<ol class="FilterList">
<xen:foreach loop="$api" value="$payments">
<xen:listitem
id="{$payments.api_id}"
label="{$payments.api_title}">
</xen:listitem>
</xen:foreach>
</ol>
I am trying to create a admin api option list, to allow a checkbox to activate or deactivate the api.
EDIT:
ok i can display my data now. template name error lol