View Single Post
  #1 (permalink)  
Old 06-05-2008, 12:20 PM
mel mel is offline
Junior Member
 
Join Date: Feb 2008
Posts: 11
Default sharing views across controllers

I currently have 4 controllers, each with the same set (4) of actions. The view scripts for each action is basically the same across different controllers, and I'd like to avoid having 16 scripts in 4 different folders. The view script structure is (the standard setup):

views/scripts/controller1/actions 1 - 4
views/scripts/controller2/actions 1 - 4
views/scripts/controller3/actions 1 - 4
views/scripts/controller4/actions 1 - 4

What I would like to have is:

views/scripts/actions 1 - 4

I know I can just add $this->render('action', null, true); to each action, but that seems a little unnecessarily repetitive.

How else can I do this? I feel like I've missed something in the documentation, but I just can't see where the controller name is added to the script path, or how to avoid that happening.

Thank in advance for any help
Reply With Quote