How to separate css file completely
I’m thinking how to place CSS parts together in html file generated by Smarty + php. CSS should be included within the header, but what if the page does have some individual CSS style?
I use a template engine Smarty. First I made the header (gather everything which is used in common. ) and include it at the head of html file with smarty syntax. And if there is some individual part of css in a page, I put css below the ‘include statement’.
HTML file with Smarty syntax
{include file='_include/header.inc.html'}
<link rel="stylesheet" href="/assets/style/top.css">
<script type="text/javascript">
$(function(){
$('#eyecatch ul').bxSlider({
pager: false,
auto: true,
pause: 5000
});
})
</script>
<article>
</article>
{include file='_include/footer.inc.html'}
But my co-worker checked the code generated with Smarty, and said “It’s not good practice, because should be put together at one place even it works”
There is right below the header ,because I didn’t put this line within the header.
Do you have any good ideas to clean-up/organize my code with Smarty as he pointed out?