Welcome Guest, Not a member yet? Register   Sign In
newbie question: using templates
#2

[eluser]Tominator[/eluser]
Hi there!

First I have to note, that I never meet this problem ... but I think that problem is because you didn't passed any data into your quoteBox view file. You should try something like:

Code:
<?php $this->load->view('includes/quoteBox', array('quote' => $quote)); ?>

Maybe help.

But I think this is so complicated solution of template problem. Because what is template?
CodeIgniter is framework based on MVC - that means your PHP files are devided in 3 categories by their role. View files are just PHP files, which contains HTML code. But in my opinion templates seperates HTML and PHP.

Wrong template system (engine, parser or whatever you call it) makes your application so complicated, because of too much separating in wrong layers.

I made my own template parser, inspirated by phpBB template parser, called COMPER Template Parser (new version soon!), which separate PHP and HTML and provide cycling, conditioning and separating in template files without PHP. You won't have the same problem when you use it.

Tom.


Messages In This Thread
newbie question: using templates - by El Forum - 10-31-2010, 10:40 AM
newbie question: using templates - by El Forum - 10-31-2010, 11:04 AM
newbie question: using templates - by El Forum - 10-31-2010, 11:12 AM
newbie question: using templates - by El Forum - 10-31-2010, 11:18 AM
newbie question: using templates - by El Forum - 10-31-2010, 11:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB