Author Topic: templating in MVC framework  (Read 561 times)

0 Members and 1 Guest are viewing this topic.

Offline anujgargTopic starter

  • Enthusiast
  • Gender: Male
    • View Profile
    • Anuj Garg - A Professional Web Developer
templating in MVC framework
« on: October 18, 2008, 05:22:10 AM »
Hi

I am using MVC based framework, Codeigniter. I want to ask if it is possible to create .html files under "view" folder. As we generally create .php files under "view" folder to maintain relationship between controller and models.

All I need to avoid the html tags/variables to be used in php files under view folder. Is there any option to do so under Codeigniter?

TIA

-- Anuj
Anuj Garg (http://anuj-blog.co.nr)

Express your thoughts here: http://www.myblogs.co.nr (and) http://www.anuj.8rf.com

Offline wildteen88

  • PHPFreaks Recommended
  • 'Insane!'
  • *
  • Gender: Male
    • View Profile
Re: templating in MVC framework
« Reply #1 on: October 18, 2008, 06:23:20 AM »
You can use .html files as the view yes. Just specify the .html extension when loading a view.
eg

$this->load->view('filename.html');

If you dont specify a file extension CI will append the .php

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.