Hi,
i'm trying to make a simple web site with cake to test if i can use it
to develop my project.
i have a general layout where i've to load multiple modules (like on
joomla or other CMS)
i've create two simple controller to menage pages and articles, i'd
like to make them interact, for example on pages table there is an
showArticles field that give the opportunity to chose if the
latestArticles component have to be show or not.
i've try somthing like this:
function view($page)
{
$this->set('pages', $this->Page->findByNome($page));
if ($this->Page->field ('news', "nome = '$page'")) $this-
>Articles->latestNews();
}
where $this->Articles referr to ArticlesController but this doesn't
work...
i haven't understand how to integrate one controller in another one,
maybe i think this can be do with components but i've not understand
how to make this
can you help me?
another way (i think) is to write some line in AppController like:
var $beforeFilter = array('loadModules');
function loadModules ($anArray) {
foreach ($anArray as $array) $this->load($array['name']);
}
function load ($name) {
// logic for loading modules
}
but how I can pass vars trough various controllers?
I know that i'm a lot confused about how cake works but in the manual
and in the tutorial i haven't find anything about it...
excuse my bad english
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---