EventController,
-addevent(this is action).
-viewevent(this is another action).
CommentController
-addcomment(this is action).
-viewcomment(this is another action).
My question is, how can i call viewevent action inside on viewcomment action.
You cannot crosscall actions, but you can always have views nested. By calling CController::renderPartial, you can always embed viewevents’ views in your main action’s view files.
As far as I understand with renderPartial we include a view and we can pass variables to it. But let’s have the following scenario:
I have a site with several pages: home, about me, contacts. And in "home" and "about me" I want to show a section with the latest news. This section (news) has no connection with the data of "home" and "about me" and it should be separated in a different controller/view and it should be included within the "home"/"about me" views. But how do I do that if I cannot call another action?
I’m a newbie to this framework so please be kind to me