[prev in list] [next in list] [prev in thread] [next in thread]
List: mason
Subject: Re: [Mason] Switch off inherit flag at runtime
From: "Marc Logghe" <Marc.Logghe () DEVGEN ! com>
Date: 2006-12-15 11:04:07
Message-ID: 0C528E3670D8CE4B8E013F6749231AA6D3DB0C () ANTARESIA ! be ! devgen ! com
[Download RAW message or body]
> if ( $m->request_args()->{'is_ajax'} )
> {
> $m->clear_buffer(); # throw away output to this point
> _your_code(); # output your content
> $m->abort(); # finish the request and return
> }
> else
> {
> _your_code(); # output your content with wrapping
> }
>
> Since often you will be using the same code regardless of an
> ajax call or a vanilla web request, I find this more compact
> that to replicate code into separate components.
Seems to work nicely, thanks. Did almost the same thing except, in order
to prevent code replication *within* the component I just used 2 if
statements, one before and one after the component block.
% $m->clear_buffer if $is_ajax
<comp content>
% $m->abort if $is_ajax
Thanks all for your help and numerous suggestions (for sure: TIMTOWTDI)!
Regards,
Marc
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic