Skip to content

Instantly share code, notes, and snippets.

@dkobia
Created June 4, 2012 16:18
Show Gist options
  • Save dkobia/2869335 to your computer and use it in GitHub Desktop.
Save dkobia/2869335 to your computer and use it in GitHub Desktop.
<?php
// In Hook -- you can even just call this for Router::$controller == 'main' only
$category_list = ORM::factory('category')->where('category_visible', '1')
->where('parent_id', '0')
->where('category_trusted != 1')
->orderby('category_position', 'ASC')
->orderby('category_title', 'ASC')
->find_all();
Kohana::config_set('settings.category_list', 'category_list');
// Then from View
echo Kohana::config('settings.category_list');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment