Skip to content

Commit

Permalink
adding relation to routes for themes
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jan 13, 2010
1 parent c786d3a commit 455e8c9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions infinitas/management/models/route.php
Expand Up @@ -36,6 +36,10 @@ class Route extends ManagementAppModel {
'Route.ordering' => 'ASC'
);

var $belongsTo = array(
'Core.Theme'
);

function getPlugins(){
$plugins = Configure::listObjects('plugin');

Expand Down Expand Up @@ -66,15 +70,23 @@ function getRoutes(){
'Route.pass',
'Route.rules',
'Route.force_backend',
'Route.force_frontend'
'Route.force_frontend',
'Route.theme_id'
),
'conditions' => array(
'Route.active' => 1
),
'order' => array(
'Route.ordering' => 'ASC'
),
'contain' => false
'contain' => array(
'Theme' => array(
'fields' => array(
'Theme.id',
'Theme.name'
)
)
)
)
);

Expand Down

0 comments on commit 455e8c9

Please sign in to comment.