Wow jcsiegrist,
it works!
So far I have a basic example for it:
-------------------------------------------------------------
CONTROLLER sections_controller.php (partial)
-------------------------------------------------------------
function add() {
if (!empty($this->data)) {
$this->cleanUpFields();
$this->Section->create();
if ($this->Section->save($this->data)) {
$insertId = $this->Section->getLastInsertId();
if(isset($this->data['Content']['en'])){
$this->Section->createTranslations($insertId,'en_gb');
}
if(isset($this->data['Content']['it'])){
$this->Section->createTranslations($insertId,'ita');
}
$this->Session->setFlash('The Section has been
saved');
$this->redirect(array('action'=>'index'), null,
true);
} else {
$this->Session->setFlash('The Section could not
be saved. Please,
try again.');
}
}
}
-------------------------------------------------------------
VIEW add.ctp (partial)
-------------------------------------------------------------
<?php
echo $form->input('title');
echo $form->input('Content.en', array('type'=>'text'));
echo $form->input('Content.it', array('type'=>'text'));
?>
-------------------------------------------------------------
This is a super basic example, maybe jcsiegrist will give us a better
one when he has time.
Dan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---