[eluser]tokyotech[/eluser]
Say I have a nifty module that simulates rounded corners and shadows via HTML/CSS only. What's the best way in CodeIgniter to reuse that module without retyping it all the time? I've thought about creating a module.php in my views folder:
Code:
<div class="module">
<span>
<div>
<span>
<?= $content ?>
</span>
</div>
</span>
</div>
So whenever I need to use this module from another view, I do:
Code:
$args['content'] = '<b>hello <span class="fart">world</span></b><br />';
$this->load->view('module.php', $args);
But this makes my code less readable because wrapping all the content in the single quotes makes all my HTML red in Dreamweaver. It's also difficult with more complicated multi-line HTML. What's a better way to do this?