First steps are done, some pages are coded. And after looking to the result I\'ve got the question... how much code is there should be in templates (View)?
For examp
When the templates need a lot of logic is could be useful to introduce the ViewModel pattern
The logic that determines when a certain block is shown is placed in the view model.
Example A template snippet:
A view model snippet:
$item['show_phone_number'] = $item["icq"] == '';