Worked like a charm. I agree that this is a cleaner way as well. However it 
might be useful if we had the ability to override added to catalyst something 
like
$c->stash
(
WRAPPER => undef,
template => 'src/mypage.tt2',
);

Or something along those lines.

Thanks,
------------------------------------------
Ali Mesdaq (CISSP, GIAC-GREM)
Sr. Security Researcher
Websense Security Labs
http://www.WebsenseSecurityLabs.com<http://www.websensesecuritylabs.com/>
------------------------------------------

From: Hernan Lopes [mailto:[email protected]]
Sent: Monday, November 29, 2010 6:38 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Overriding Catalyst::View::TT WRAPPER

I personally think that [% IF no_wrapper %] etc is not clean enough so
i would create a new view and call it View::NoWrapper
then you can set
$c->stash(
current_view => 'NoWrapper',
template => 'src/mypage.html',
);

and then, you will need to set a wrapper.tt<http://wrapper.tt>.
But you can choose to leave it with [% content %] only, or add some html 
headers.. or whatever you need.

--Hernan
On Mon, Nov 29, 2010 at 11:27 PM, Sam Kaufman 
<[email protected]<mailto:[email protected]>> wrote:
I've found the easiest way is to have some logic in your wrapper:
something like this:
[%
 IF no_wrapper;
 content;
 ELSE;
 content WRAPPER site/html + site/layout;
END;
%]
so $c->stash(no_wrapper => 1) and it won't be wrapped.
-Sam

On Mon, Nov 29, 2010 at 8:16 PM, Mesdaq, Ali 
<[email protected]<mailto:[email protected]>> wrote:
> Hey Everyone,
>
> Got a question about how I can override my application's TT wrapper. The 
> closest thing I found was 
> http://search.cpan.org/~abraxxa/Catalyst-View-TT-0.36/lib/Catalyst/View/TT.pm#CONFIGURATION<http://search.cpan.org/%7Eabraxxa/Catalyst-View-TT-0.36/lib/Catalyst/View/TT.pm#CONFIGURATION>
>  . But what I am trying to do is basically have the wrapper turned off for a 
> specific public method where I will create a new TT file that I want used 
> without it being wrapped.
>
> Thanks,
> ALI MESDAQ
> Sr. Security Researcher
>
> WEBSENSE, INC.
> ph: +1.858.320.9466
> fax: +1.858.784.4466
> www.websense.com<http://www.websense.com>
>
> Websense TRITON™
> For Essential Information Protection™
> Web Security | Data Security | Email Security
>
>
>
>
>  Protected by Websense Hosted Email Security -- 
> www.websense.com<http://www.websense.com>
>
> _______________________________________________
> List: [email protected]<mailto:[email protected]>
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
>

_______________________________________________
List: [email protected]<mailto:[email protected]>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/



Click 
here<https://www.mailcontrol.com/sr/OB1FpLCS0LfTndxI!oX7Uq23VvDsoYOLJDLGjbmvrfd1rOoY61cT!pyvbRRINjeCKhZ27KkX4EHX9jTmmkEZ8A==>
 to report this email as spam.
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to