/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function switchlibrary($controllerName = null){ $styles; $scripts; $returnScripts=''; $returnStyles=''; $jquery = 'public/js/jquery.min.js'; $cufon = 'public/js/cufon.yui.js'; $quicksand ='public/js/quicksand.js'; $custom = 'public/js/custom.js'; $fancybox = 'public/js/fancybox/jquery.fancybox-1.3.0.pack.js'; $slider = 'public/js/jquery.anythingslider.js'; $style = 'public/css/style.css'; $slidercss = 'public/css/anythingslider.css'; $fancyboxcss = 'public/js/fancybox/jquery.fancybox-1.3.0.css'; $twitter = 'public/js/twitter.min.js'; switch($controllerName){ case 'Home': break; case 'Portfolio': break; case 'Social': break; case 'Skills': break; case 'Contact': break; } $returnScripts.=link_script($scripts[$sc]); } $returnStyles.=link_tag($styles[$st]); } return $returnStyles.$returnScripts; }else{ return false; } } ?>