The reason I transformed the "pages" architecture from static to
dynamic is that I wanted to use the name "pages" in my url, instead of
something like "sections" or "articles". And the pages model is going
to be the most important part of my app, so I wanted to give it a
clear name. I'm not going to use the static pages functionality
anyway.

> And if you removed your route for the pages controller, how are you
> performing the logic?

I didn't remove it actually, I just changed it from:
$Route->connect('/pages/*', array('controller' => 'pages', 'action' =>
'display'));
to
$Route->connect('/pages/*', array('controller' => 'pages', 'action' =>
'index'));

So I can use it as a normal controller.

I thought I'd just try it, and it works okay, apart from the error
checking.

> I'd probably stick to using a basic controller to perform your logic.
To be clear: I just created my own basic pages controller, I didn't
adapt Cake's default static pages controller.

 Do you really think there will be any trouble in doing it this way?
I've seen other people do it here on the forum.


On 11 apr, 16:38, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'd probably stick to using a basic controller to perform your logic.
> What was your reasoning for retrieving pages as dynamic instead of
> static?
> And if you removed your route for the pages controller, how are you
> performing the logic?
>
> On Apr 11, 10:22 am, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > I've changed Cake's default static "pages" architecture to be dynamic,
> > and also commented out the default route for this controller. All went
> > fine, until I tried to get some associations up and running.
>
> > I tried to link pages to sites, using belongsTo, but when I do a
> > pr($data); in the view, nothing is shown. When I remove the
> > association it shows a normal array of all the pages. I tried several
> > kinds of associations, but they all have the same effect (nothing is
> > printed).
>
> > I have no problems making associations in any other model, just the
> > pages one. Could there be some sort of (namespace?) conflict with the
> > inner workings of Cake? And if so, is there a solution, because I'd
> > really like to use the name "pages" in the url.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to