Best practice for placement of display logic in a view in cakephp in PHP Server Side Scripting Language?

editAnswer

reportReport

Answer(s) available: 1

Yashita Sehgal

, Ambulance Drivers, Key Performance Indicators Hospital Automation

"

i'd suggest keeping that logic in the view, building HTML in your model breaks the whole view/model separation. i don't think there's anything wrong with view logic, personally i tend to constrain it to basic conditionals.

"

ultimately i think the idea is figuring out where this logic best fits. in this case, the logic is, "if i have a certain type, i should provide a link to it", which is a view problem, not a model problem.

"

thumb_upUpvote11

smsComment

reportReport