My main template file is in this sort of format (obviously the real one has more html in it):
<title><?php echo $this->data['title']; ?></title>
<?php echo $this->data['content']; ?>
I was thinking of doing it this way:
When I create the view object in the controller I could add the required files (in an array) to the view object so then they could be accessed in the main template like
<head> of the page.
Is this an okay way to do it or is it breaking some rules or bad practice? Thanks.
It is totally okay, though I advice you to write yourself a
asset() method in order to prepend your basepath before filename [e.g.
http://yoursite.com/web/] so your code is more portable an deploying is easier.
As Fluffeh said consider compressing your whole styles in a single file for better performance - check YUI compressor for example.