Hi David,

I doubt there is an official solution. When you want to reuse a template, it 
immediately breaks the convention for template naming set by the ViewRenderer 
plugin. So the solutions you noted are pretty much the way to go, depending on 
the end user. If you have a group of others changing your work, symlinks tend 
to get confusing as the code moves cross platform. I would probably end up just 
adding a mock template which simply render()'s in the template you need. Not 
the prettiest, but it makes the linkage obvious while developing, and without 
resorting to Controller editing. I'm sure other people have different 
approaches.

Paddy

 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com


----- Original Message ----
From: David Mintz <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, September 11, 2007 4:04:41 PM
Subject: [fw-general] actions sharing views, views rendering other views

This is basic, but I don't seem to be getting it.

What is the recommended way to have multiple actions share view scripts? 
Suppose, for example, that example.org/things/create
 and example.org/things/update/5436 are, respectively, for creating a new thing 
and editing the thing whose id is 5436. I'd like them both to use a 
thingform.phtml
. I see that controller methods can "manually" go $this->render('thingform') 
and that works, or I can symlink thingform to create.phtml and not render 
manually... but what's the officially approved technique?


I have not been able to figure out how to make a view include/render another 
view, except with a plain old PHP include() or require(), which also works, 
but... Same question:  what's the recommended technique for this?


Thanks a million,

-- 
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness






       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play 
Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

Reply via email to