All pastes #396087 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-15 14:25 UTC
rendered paste body
<?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));
        }
}
?>