Happy Day… to All
I was Very new to Yii framework, I just started to learn and it was very interesting, and with reference of Agile book I have started a sample project, I don’t know how to display names instead of title_id can change in manage page but not in view page ., Please any one help me.
For the past one week i was trying to solve this…
But nothing works…Plz any one help me to solve this…
April 17, 2014, 7:13am
Hey, Look for a file called update.php, in your view files,and change the line
<h1>Update <?php echo $model->id; ?></h1>
<h1>Update <?php echo $model->title; ?></h1>
Let us know if this is what you were looking for.
No friend i insert my screen shot here see that i want to change the id to name…
April 17, 2014, 11:43am
What you mean by manage?
Where you want to display name instead of id?
Thanks for your reply Aneesh… i explain in my screen shot
April 17, 2014, 12:23pm
Its the view page for an entry in that model. Not sure what you mean by manage page? Is it admin page?
in your view change id to title… i.e. $model->title like someone said above. or the content and /or title in your database is saved as 2 and that’s not the id.
Thank you friends i cleared out …
in my model page i had added
public function showParent($id)
$parent_title = self::model()->findByPk($id);
and my view file…