View Helper Scope

Let's put it this way: if you were a newbie, I'd strongly suggest not
putting any formatting code into the model. As I'm quite sure that you
know what you're doing, such admonitions are not necessary.

The issue at hand is rather general and therefore advice can only be
general. Keep concerns separated and keep related concerns in related

For beginners, this translates to: Handle all formatting in the UI-layer
and extract commonalities into helpers and partials. More advanced are
free to make exceptions to this rule, because they understand and adhere
to the principles behind it.


Well, I certainly started an interesting thread here.

I've learnt something and realised that helpers are not the solution I
needed but partials are.

I was trying to separate out some view logic that changes based on user
settings or based on the domain name used to access the site. I
originally thought I could call a helper from my layout that the
relevant helper would be called based on the context. I realise now that
is not a good solution and that I can achieve what I want with partials.

I've also come away with some interesting reading so I'm grateful for
the evolution of this thread.