Let’s Use Code Igniter 2 part 2

As I said earlier, I was make a basic page. Now I will try different way to make basic page. Unlike before, We can build ASAP too and with different style. You will notice if the code are like before (remember previous post) where we show all random mode.

If we see on the view, there is so much type in there.. and important, the code don’t use any php like <?php echo ‘enter’; ?>

is there possibly that the we can type like this , example {{body}} than <?php echo $body ; ?>
For this task we need 2 help from controller and data. Before let’s see previous code

Let’s return  to view and  then create home2.php I don’t erase the home.php for study purpose

For this tutorial we need different way to type it all..

Since we will use home2 as basic, let’s go to controller/home.php
inside update the index. We will using parser, this parser used to replace {your code} into text you type in data. this index is the next update, we need to change the header like above.
but you need to type

$this->body = nl2br($this-mo,,,

the you will have like this

Same as Previous

Next I want to use typography. It said this model help us to make whatever we type will be like nl2br

but I tried, the result is negative. Perhaps I was doing wrong this time?!?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: