PRADO=>Yii TContentPlaceHolder substitution

I really like in PRADO the concept of placeholders. I want to know how can I replace/use this concept in Yii.

In general, you only need to use the layout feature in yii.

If this is not enough, you can use the 'clips' feature: you first define clips by enclosing contents in $this->beginClip() and endClip() calls. You then dump out the clips at the places you like by "echo $this->clips[clipID]".

Thx for fast reply.

I'll try to say what I want to do and I guess you'll suggest me which approach (clip or layout) is the best one.

I've page divided into two parts:

a) main panel

B) right side panel

Now, lets imagine following scenario.

I've two Controllers: NewsController and ProfileController.

NewsController has two actions list (display a list of news) and show (display entire news).

ProfileController has one action: show (display profile).

When action flow is following:

a) news/list: in main panel is displayed list of news, in right side panel is displayed list of 10 latest news (only heads)

b1) when user will select one news (news/show), it will be displayed in main part and right panel should stay unchanged

b2) when user will click on author (profile/show) of the news it will be redirected to profile, on right site he will see list of last 10 news created by this author.

P.S. I’m still learning Yii and it seems to be so good as PRADO (and fast in development too). I see also that switching from PRADO to Yii is not so hard :)

For your problem, clip should be one of the best solutions.

Your right side panel should be rendered in layout. Inside the panel, you mainly "echo" specific clips.

You main panel is rendered in a view, which displays the main content (e.g. list of news, entire news, profile) and defines the corresponding clips (e.g. last 10 news created by the author).

For better reusability. content in each clip may be generated using a widget.