Sections belongTo Sections - parent child relationship with parent_id
field
Sections HABTM Titles with Language (look at the ARO HBTM ACO with
Permission on how this works)
Then findAllThreaded('Language.code' => 'en') should work.(But I have
not tested it).
A similar approach can be used for any structure like this. the ACL
stuff is a good place to see it in action.
I still recommend you use the l10n, i18n stuff in this instance
though, as this is what it was designed to do.
Geoff
--
http://lemoncake.wordpress.com
On Jul 23, 9:20 am, michaelmcandrew <[EMAIL PROTECTED]> wrote:
> Thanks Geoff, I will look into that. But I would like to know how to
> do this though - say, if in place of langauges, I wanted to add
> versions to the website, i imagine it would be a similar principle.
> any ideas?
>
> On Jul 23, 12:44 am, Geoff Ford <[EMAIL PROTECTED]> wrote:
>
> > Some resources on internationalisation are listed on this
> > pagehttp://groups.google.com/group/cake-php/web/frequent-discussions
>
> > Have a look at the section on How to add i18n support? and Translate
> > behaviour.
>
> > Geoff
> > --http://lemoncake.wordpress.com
>
> > On Jul 23, 8:22 am, michaelmcandrew <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I am having some troubles getting cake to interact with my database
> > > how I want it to.
>
> > > I have a site organised into sections. Sections are threaded, with
> > > some being parents of others. The site is available in an arbitrary
> > > number of languages. So there is a languages table detailing the
> > > languages, and a text table with language_id and section_id fields,
> > > where I store text, the title and so on for each page in each
> > > language.
>
> > > The problem I have is in creating the menu. I want the text in the
> > > menu to come from the title field in the text table. But i can't find
> > > a way of neatly linking the text and the section table using
> > > findAllThreaded to allow be to do this. I guess I could use a foreach
> > > loop in a tree helper to go through the languages and select the
> > > correct text, but that seems like a clumsy way to go about it.
>
> > > I tried...
>
> > > $this->Section->Text->findAllThreaded(NULL, NULL, NULL));
>
> > > ...but that didn't work.
>
> > > Anyone have a better way to approach this problem?
>
> > > Thanks!
>
> > > Michael
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---