Welcome Guest, Not a member yet? Register   Sign In
link_tag() not working
#1

[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;
#2

[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?
#3

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

Thanks!
#4

[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.




Theme © iAndrew 2016 - Forum software by © MyBB