I wanted to write a set of functions available to me from the view to do some repetative tasks, such as converting a number to a set monetary format. It was obvious to me that I needed to write a custom view helper, but I had some small problems along the way that are worth mentioning.
In my first post below, I covered how to create a FC plugin to ensure that a user is authenticated when they access every controller.
As part of our layout, we want to include a generic style sheet in each page, and a custom style sheet for each controller to each rendered page. As in the previous post, we wanted effectively to run some code in each and every controller, but did not want to have to include the code in each and every controller. As we already had a FC plugin that was handling the authentication, I decided to modify this to set a view variable that can be accessed from the layout.