Hi, I’m new to yii…
Did the multilingual support, everything works except for the listing.
I have 2 tables/models NewsCategories & NewsCategorieslang
While listing the NewsCategories via CGridView, I am trying to join the category name from the other table on lang column = "en" in that other table.
Here’s are the relations (which I was trying to turn around and every way I could think of ))):
NewsCategories
return array(
'langt' => array(self::HAS_MANY, 'NewsCategorieslang', 'news_categoriesId'),
);
NewsCategorieslang
return array(
'langt' => array(self::BELONGS_TO, 'NewsCategories', 'nca_id', 'condition' => 'lang = "en"'),
);
nca_id is the PK in NewsCategories table, and the news_categoriesId is the foreign key in the NewsCategorieslang table.
The CGridView is outputing empty strings in that column…
Can anyone help? I’m kind of struggling here… The manual didn’t help