do you have 2 seperate apps? why not just use admin prefix routing?

On Aug 24, 6:36 am, Steve <steve.king5...@googlemail.com> wrote:
> Hi all.  I am new to CakePHP and I am building a CMS with the
> following folder structure:
>
> /public_html/cake/
> /public_html/admin/
> /public_html/frontend/
> index.php
>
> I have setup the bootstrap.php file in the frontend to look for models
> in the admin app.  So models for user, content and comment are shared.
>
> In my frontend, i have setup a HomeController which I want to use to
> display results from the 'Contents' table:
>
> {{{
> class HomeController extends AppController {
>
>         var $name = 'Home';
>         var $uses = array(); // No Home model required
>
>         function index(){
>
>           $this->loadModel('Content'); // Best practise according to cookbook
>           $blogPosts = $this->Content->find('all');
>           $this->set('blogPosts', $blogPosts);
>
>         }
>
> }
> }}}
>
> When I debug $blogPosts in my view, it gives me everything in the
> 'Contents' table, no problem.  **But nothing from any related tables**
> - I want to display the author of the post as well, which is contained
> in the 'users' table.
>
> When I debug the output from find('all') in the admin app, relational
> data from the 'users' table is displayed properly.  **Why won't this
> work on my frontend?**  I have tried copying the models to the
> frontend app with no success.  I have tinkered with recursive values,
> tried loading the users model, using containable...no joy.
>
> The relationships in my models seem to be correct, as the data
> displays properly in the admin app.  And the frontend is clearly able
> to access my models as it does display **some** data from them...
>
> Is there anything anyone can see I'm doing wrong?  Or could there be
> some setting somewhere else in the application that is causing this?
> Please help!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to