Thursday, September 2, 2010

Re: Code Placement

hi dave

On Thu, September 2, 2010 3:48 pm, Dave Maharaj wrote:
> When I have if statements for views I make a helper to simplify the code
> rather than if this if that all over the places, simply pass the variables
> to the helper and get the values I need returned.
>
>
>
> But what about for the controller? I have a rather ugly block of code used
> in a few places and it sure would streamline changes. Where should code
> like
> this go? Its used in about 7 places and its rather horrible

you can either stick it in app_controller or write a component.

--
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mikek@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel: 07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: