CodeIgniter Forums
link_tag problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: link_tag problem (/showthread.php?tid=5970)



link_tag problem - El Forum - 02-10-2008

[eluser]coolant[/eluser]
I downloaded the newest version of CI (1.6.0) and started getting into it.

I tried this code in my view file
Code:
<?php
link_tag('css/style.css');
?>

and the css did not stylize anything. Now, if I change line 309 in html_helper.php to echo instead of return, it works.

Any ideas why?


link_tag problem - El Forum - 02-10-2008

[eluser]mdavis1982[/eluser]
Try...

Code:
<?php
echo link_tag('css/style.css');
?>

Cheers...

Matt


link_tag problem - El Forum - 02-10-2008

[eluser]coolant[/eluser]
Bah! That should be fixed in the documentation then...

http://ellislab.com/codeigniter/user-guide/helpers/html_helper.html

Thanks Smile


link_tag problem - El Forum - 02-10-2008

[eluser]wiredesignz[/eluser]
Yes I agree, CodeIgniter shouldn't force people to think. Tongue


link_tag problem - El Forum - 02-10-2008

[eluser]Derek Allard[/eluser]
Sorry coolant. I've added explicit echo statements to those examples. Its fixed in the repository, and will be part of the next CodeIgniter release.


link_tag problem - El Forum - 02-10-2008

[eluser]coolant[/eluser]
[quote author="wiredesignz" date="1202699734"]Yes I agree, CodeIgniter shouldn't force people to think. Tongue[/quote]

br() and heading() in the manual both show echo's before it - so just trying to be consistent.

Otherwise - I'm enjoying CI so far! Good product!