CodeIgniter Forums
link_tag() not working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: link_tag() not working (/showthread.php?tid=5841)



link_tag() not working - El Forum - 02-05-2008

[eluser]Unknown[/eluser]
HTML helper is loaded and br() heading() and others are working just fine. However, link_tag() breaks the page. No error messages, but it just stops (see below -- the "Test Site" header appears, but "This is a testing site" does not.

Am I missing something?

Code:
<?php
$this->load->helper('html');
$this->load->helper('url');
?>

<html>
<head>
<title>Testing</title>
</head>
<body>

<h1>Test Site 1.0</h1>

&lt;?php echo link_tag('css/style.css'); ?&gt;


<p>This is a testing site</p>

<p><br />Page rendered in {elapsed_time} seconds</p>


&lt;/body&gt;
&lt;/html&gt;



link_tag() not working - El Forum - 02-05-2008

[eluser]Derek Allard[/eluser]
What version of CI? Could you open up system/helpers/html_helper.php and look for
Code:
if (! function_exists('link_tag'))
{
    function link_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE)
    {
for me?


link_tag() not working - El Forum - 02-06-2008

[eluser]Unknown[/eluser]
I'm using version 1.5.4, and I am not seeing that code in system/helpers/html_helper.php .

Thanks!


link_tag() not working - El Forum - 02-06-2008

[eluser]Derek Allard[/eluser]
link was added in 1.6, and the docs you're looking at are for 1.6 also. Sorry. You can just replace the html helper if you don't want to fully update... but I'd encourage you to update.