Welcome Guest, Not a member yet? Register   Sign In
Bootstrapping views in CodeIgniter
#1

[eluser]heyitsmarcucu[/eluser]
Anyone has experience in Bootstrapping views in CodeIgniter?

Some examples and references can be helpful. Smile

P.S. to the admin of the forums: It seems I posted a while ago in other forums, can you delete the other post, thanks. Smile
#2

[eluser]InsiteFX[/eluser]
Are you talking about the Twitter Bootstrap 3.0 ?
#3

[eluser]heyitsmarcucu[/eluser]
Yes! Bootstrap 3.0 Smile
#4

[eluser]InsiteFX[/eluser]
You need to include the required bootstrap files in your php view files, I usually create a header view for that.

Then just create bootstrap files in your views folder and add the header view to them.

If you get stuck I can create a sample project for you latter this week.
#5

[eluser]heyitsmarcucu[/eluser]
Thanks man!

Maybe upload it in a repo at Github and maybe I can just pull or fork it? Smile
#6

[eluser]InsiteFX[/eluser]
Just contact me through Skype and I will be able to send the project to you when finished.
#7

[eluser]Mavarik[/eluser]
[quote author="InsiteFX" date="1399387820"]You need to include the required bootstrap files in your php view files, I usually create a header view for that.

Then just create bootstrap files in your views folder and add the header view to them.

If you get stuck I can create a sample project for you latter this week.
[/quote]

This maybe not the best practice, but is working for me on a couple BS2/3 themes.
I have header template - which includes code until just before </head> tag.
Then Nav and Footer templates.
Then in the content pages I do something like this.

$this->load->view('templates/header', $this->data);
<!-- Put extra header tags in here css/js etc -->
</head>
<body>
$this->load->view('templates/nav', $this->data);
<div class="main-content">

rest of page content here.




Theme © iAndrew 2016 - Forum software by © MyBB