Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

Configure View::TT per request

 

 

Catalyst dev RSS feed   Index | Next | Previous | View Threaded


devincoran at yahoo

Oct 19, 2007, 12:35 PM

Post #1 of 4 (1437 views)
Permalink
Configure View::TT per request

Hi,

I'm new to catalyst and am stuck on how to do this..

I'm using View::TT and for most of my requests I do
want it to use the standard config with:

PRE_PROCESS => 'config/main',
WRAPPER => 'site/wrapper',

However by the same token I have a number of other
requests, like ajax content coming into a div, where I
don't want to use those config options or add a
header/footer etc.

For now I've been getting around by using [% IF
somevar %] type blocks to include/exclude header/foot
content but that's rather hacked, what I really need
is to be able to configure the View::TT per request.

I even have one template that I need to display
without going through TT at all, it needs to show as
plain text so a user can edit it as is. For that I
had to edit the wrapper to pass it through as text
when it sees a template with that name.

So again if I could configure View:TT per request I
can avoid hacks.

thanks!
Devo

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


syber.rus at gmail

Oct 20, 2007, 5:13 AM

Post #2 of 4 (1305 views)
Permalink
Re: Configure View::TT per request [In reply to]

Create a second View with other wrapper (or without it) and use it.

2007/10/19, Devo Coran <devincoran [at] yahoo>:
>
> Hi,
>
> I'm new to catalyst and am stuck on how to do this..
>
> I'm using View::TT and for most of my requests I do
> want it to use the standard config with:
>
> PRE_PROCESS => 'config/main',
> WRAPPER => 'site/wrapper',
>
> However by the same token I have a number of other
> requests, like ajax content coming into a div, where I
> don't want to use those config options or add a
> header/footer etc.
>
> For now I've been getting around by using [% IF
> somevar %] type blocks to include/exclude header/foot
> content but that's rather hacked, what I really need
> is to be able to configure the View::TT per request.
>
> I even have one template that I need to display
> without going through TT at all, it needs to show as
> plain text so a user can edit it as is. For that I
> had to edit the wrapper to pass it through as text
> when it sees a template with that name.
>
> So again if I could configure View:TT per request I
> can avoid hacks.
>
> thanks!
> Devo
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
>


dbix-class at trout

Oct 21, 2007, 11:45 AM

Post #3 of 4 (1303 views)
Permalink
Re: Configure View::TT per request [In reply to]

On Fri, Oct 19, 2007 at 12:35:31PM -0700, Devo Coran wrote:
> Hi,
>
> I'm new to catalyst and am stuck on how to do this..

Then you should be posting to the users' list, not the developers list.
This is for development -of- Catalyst and assorted modules, as the list
title indicates.

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


devincoran at yahoo

Oct 21, 2007, 9:29 PM

Post #4 of 4 (1283 views)
Permalink
Re: Configure View::TT per request [In reply to]

> Create a second View with other wrapper (or without
> it) and use it.


Ahh yes of course, thanks still getting used to this.

Devo





--- Oleg Pronin <syber.rus [at] gmail> wrote:


>
> 2007/10/19, Devo Coran <devincoran [at] yahoo>:
> >
> > Hi,
> >
> > I'm new to catalyst and am stuck on how to do
> this..
> >
> > I'm using View::TT and for most of my requests I
> do
> > want it to use the standard config with:
> >
> > PRE_PROCESS => 'config/main',
> > WRAPPER => 'site/wrapper',
> >
> > However by the same token I have a number of other
> > requests, like ajax content coming into a div,
> where I
> > don't want to use those config options or add a
> > header/footer etc.
> >
> > For now I've been getting around by using [% IF
> > somevar %] type blocks to include/exclude
> header/foot
> > content but that's rather hacked, what I really
> need
> > is to be able to configure the View::TT per
> request.
> >
> > I even have one template that I need to display
> > without going through TT at all, it needs to show
> as
> > plain text so a user can edit it as is. For that
> I
> > had to edit the wrapper to pass it through as text
> > when it sees a template with that name.
> >
> > So again if I could configure View:TT per request
> I
> > can avoid hacks.
> >
> > thanks!
> > Devo
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> > _______________________________________________
> > Catalyst-dev mailing list
> > Catalyst-dev [at] lists
> >
>
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
> >
> > _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
>
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
>


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.