CodeIgniter Forums
link_tag improved - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: link_tag improved (/thread-47754.html)



link_tag improved - El Forum - 12-21-2011

[eluser]porquero[/eluser]
I've modified the link_tag helper for reload css files when it changes.
Also I add js_tag helper to make the same.

For this I've created 'MY_html_helper' custom helper, so you can use easily.
Only copy file into 'helpers' in your project.

The functions are:

link_tag()
js_tag();

Example:

// change css/main.css -> css/main.css?{mtime} -> css/main.css?12342343 automaticaly
echo link_tag('css/main.css');
echo js_tag('js/system.js');