I should maybe also add that I'm trying to also implement the
Translate Behaviour with this and the slug field would be hopefully be
translatable as well, so it has to read from the i18n table.

I'm thinking that maybe I have to store the entire URL in the slug
field - eg 'common-expressions/greetings/hello' rather than just
'hello' to implement this. When a page is added or moved I would need
to loop through all the ancestors and build the slug before the save.
Am I on the right track here?

This is my controller at the moment:
        function index($slug = null) {
                $pagina = $this->Pagina->findBySlug($slug);
                if(empty($pagina)) {
                        $this->Session->setFlash(__('Sorry, this page could not 
be found.',
true));
                        //$this->redirect(somewhere);
                } else {
                        $this->set('pagina', $pagina);
                }
        }

But it's not reading the slug from the i18n table.

All help gratefully received.

On Feb 7, 7:12 pm, martinp <[EMAIL PROTECTED]> wrote:
> I'm getting to grips with the Tree behaviour in 1.2, but what I really
> want to be able to do is have sections and sub-sections in my URLs as
> required.
>
> For example, if my page, "hello", had a parent, "greetings", which in
> turn had a parent, "common-expressions", I'd like my URL to be /common-
> expressions/greetings/hello
>
> Does anyone have any pointers on how to implement this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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