0
votes

I have a few questions regarding the HTML Helper on the code igniter website.

http://codeigniter.com/user_guide/helpers/html_helper.html

It shows where you can echo out the doctype but then my thinking is you'd have to do the manual html code for like the head tag, body tag and title tag but it has the meta tag.

So what would be the point in doing this?

<?php echo doctype(); ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <?php 
    echo meta('description', 'My Great site'); 
    echo meta('Content-type', 'text/html; charset=utf-8', 'equiv');  
    ?>
</head>
<body>

</body>
</html>
1

1 Answers

1
votes

In a model pop those meta tags into an array and sent it to your view. Then use a foreach to output your meta tags, and wha-la many lines of meta turn into one line of php, and your meta tags can easily be edited in your model.