Welcome Guest, Not a member yet? Register   Sign In
Template question
#1

[eluser]reyntjensw[/eluser]
Hi there,

I've been using ruby on rails and I'd like to try something else that works on my php host so I've choosen CI. Now what I'm wondering is, in ruby on rails, it's easy to make a template by controller.

Is this also possible in CI, to use 1 template file for 1 controller only?

And is it possible to use a basic html page (with only the html tags), and then put the content for each action in the yield tag (in ruby)

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
&lt;title&gt;title&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
    <div class="content">
        <%= yield -%>
    </div>
&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
Template question - by El Forum - 04-02-2009, 04:14 AM
Template question - by El Forum - 04-02-2009, 04:50 AM
Template question - by El Forum - 04-02-2009, 05:50 AM
Template question - by El Forum - 04-02-2009, 09:37 AM
Template question - by El Forum - 04-02-2009, 09:53 AM
Template question - by El Forum - 04-02-2009, 09:55 AM
Template question - by El Forum - 04-02-2009, 10:08 AM
Template question - by El Forum - 04-02-2009, 02:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB