At the moment I have a website deployed using spaghetti coding - the PHP is intermingled through the HTML etc.
Each time there is a requirement to change anything significant with the layout, there is quite a big task to modify 100's of files to add / remove HTML, add/change classes and so on.
I started looking into templating and frameworks to try and make it easier as the theory is you separate presentation from logic which sounded ideal.
However upon further investigation I am struggling to see the benefit in this use case (I can see other benefits like cleaner code, easier for other developers to understand, possibility of designers being able to change layouts without involving developers and so on)
For example, today I have 200 files containing something like this:
<div class="outer">
<div class="inner">
<?php print $output; ?>
</div>
</div>
From what I have read, should I deploy templating I would end up with something like:
<div class="outer">
<div class="inner">
{output}
</div>
</div>
How does this make it any easier for me to change anything to do with the layout or presentation? I still have 200 files each containing HTML which need to be changed and instead of "PHP" I have placeholders.
However, if I want to add / remove a DIV or change a class, for example, I still need to do this manually in x files or use a search/replace etc.
Is there any easier way to achieve what I need to do?