Hi,
I'm working on a bi-lingual (EN and FR) site and have the following:
class Tip extends DataObject{
public static $db = array (
"Title"=>"Varchar(255)",
"Content"=>"HTMLText"
);
public static $has_one = array(
"Image"=>"Image"
);
static $many_many = array(
'RelatedProducts'=>'Product',
);
private static $translatable_fields = array(
'Title',
'Content',
'RelatedProducts'
);
For products:
Product is already translated by using translatable, so I have 2 pages for the same product, one for EN and one for FR
class Product extends Page {
private static $description = 'Use this PageType to create Products in the site.';
// private static $icon = 'mysite/images/product';
private static $db = array(
'Headline' => 'HTMLText',
);
public static $has_one = array(
'PrimaryImage' => 'Image',
);
static $has_many = array(
'ProductImages' => 'ProductImage',
'ProductDirections' => 'ProductDirection',
'AvailableSizes' => 'AvailableSize'
);
public static $belongs_many_many = array (
'ProductFeatures' => 'ProductFeature',
'Recipes'=>'Recipe',
'Tips'=>'Tip',
'CollectionProgramOptions' => 'CollectionProgramOption',
);
Is there a way to create an additional column in the TIp-Product table to have Product_id_fr?
And I will also appreciate help on how to add these fields to the my form. (Content and Title are working fine).
Thanks!