Miscellany
public text v1 · immutable<?php
class CategoriesController extends AppController
{
var $name = 'Categories';
function beforeFilter()
{
$this->Category->order = 'priority ASC';
$this->set('categories', $this->Category->findAll());
}
function index()
{
}
function listsubcategories($id = null)
{
$conditions = array('id' => $id);
$this->set('subcategories', $this->Category->find($conditions, null));
}
}
?>