I use one main template and there is another subpattern (I call it so). For example, when I have a page like
http://site.ru/main/profile then I additionally load the profile.php template, which is a sublab of main.php.
I need to write a method that will always be called, even if the page looks like
http://site.ru/main/profile/edit I have a ProfileController controller. When the first link - the action is called actionIndex, when the second - actionEdit.
What method should I write, what would it be called in both cases?