From: <me...@st...> - 2005-09-03 21:16:54
|
>>>>> "A" == A Pagaltzis <pag...@gm...> writes: A> That used to bug me until I started using CGI::Prototype::Hidden, A> where the WRAPPER template takes care of this adequately. The A> variables are all shared between the main template and the A> wrapper, which includes `self`, so you just can do something like A> Content-type: [% self.content_type %] A> at the top of the wrapper and have a `content_type` method which A> sets the default in your application class, and then change it A> for pages which deliver a different type of content. A> I found responsibilities are actually separated more cleanly this A> way. Correct. Not knowing (really) what would happen when you say ->render, the best thing is to leave the content-type to the renderer, and if you wanted to push some part of that back to controller callbacks, the framework is definitely there. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <me...@st...> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! |