Part of the EllisLab Network
   
15 of 15
15
Template Library Version 1.4
Posted: 24 August 2011 08:41 AM   [ Ignore ]   [ # 141 ]  
Grad Student
Rank
Total Posts:  41
Joined  02-05-2011

wow fast replay..

Nothing i have again problem is not work i dont know i try more method and dont work…
I type u code and i have

A PHP Error was encountered

Severity
Notice

Message
Undefined variablearr

Filename
tpl_default/blog.php

Line Number
Profile
 
 
Posted: 24 August 2011 08:52 AM   [ Ignore ]   [ # 142 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  693
Joined  05-28-2008

I suggest you read http://www.williamsconcepts.com/ci/codeigniter/libraries/template/reference.html#writing and http://codeigniter.com/user_guide/general/views.html again, especially the section “Adding Dynamic Data to the View”.

 Signature 

Bramme.net webdevelopment
If I had a nickel for every time someone told me that my idea for melting down coins to make a giant robotic parrot was a bad idea, I would have one kicka$$ giant robotic parrot.

Profile
 
 
Posted: 24 August 2011 09:13 AM   [ Ignore ]   [ # 143 ]  
Grad Student
Rank
Total Posts:  41
Joined  02-05-2011

Hey i forgot to say am not begener in php and Codeigniter framework.. I work one year and i know all ducumentation for CI… I never use this library i try this day and have problem.. I read all documentation from oficial web site and all is perfect work. This is one problem i dont know i use HMVC structure on my APP…
I read now this link and i dont have result for this…
Any solutuion?

Profile
 
 
Posted: 24 August 2011 01:27 PM   [ Ignore ]   [ # 144 ]  
Grad Student
Rank
Total Posts:  41
Joined  02-05-2011

Some Answer?

Profile
 
 
Posted: 25 August 2011 06:50 PM   [ Ignore ]   [ # 145 ]  
Summer Student
Total Posts:  26
Joined  01-30-2007

maybe you are not beginner but surely you need to read a bit more smile

$this->load->vars($data); 

http://codeigniter.com/user_guide/libraries/loader.html

“To supply these variables to your master template, use CodeIgniter’s $this->load->vars() mechanism.”
http://williamsconcepts.com/ci/codeigniter/libraries/template/reference.html

Profile
 
 
Posted: 07 December 2011 02:56 PM   [ Ignore ]   [ # 146 ]  
Summer Student
Total Posts:  4
Joined  11-10-2011

Hi,

Thanks everyone and specially the creator of the template. I am quite a newbie to Codeigniter and while using the template I am having this particular issue. I have searched the net a bit and this forum too and was unable to find a solution, so if any one can pinpoint me to it or provide me then I would be really greatfull:

$data->sizes $this->m_price->get_sizes();
$this->template->write_view('part4''parts/part4'$data);
var_dump($data); 

Now to showcase what the $data actually holds here is the result of the var_dump of the $data variable:

object(stdClass)#29 (1) { ["sizes"]=> array(26) { [0]=> object(stdClass)#34 (1) { ["actual_size"]=> string(1) "6" } [1]=> object(stdClass)#33 (1) { ["actual_size"]=> string(1) "8" } [2]=> object(stdClass)#35 (1) { ["actual_size"]=> string(2) "10" } [3]=> object(stdClass)#36 (1) { ["actual_size"]=> string(2) "12" } [4]=> object(stdClass)#37 (1) { ["actual_size"]=> string(2) "14" } [5]=> object(stdClass)#38 (1) { ["actual_size"]=> string(2) "16" } [6]=> object(stdClass)#39 (1) { ["actual_size"]=> string(2) "18" } [7]=> object(stdClass)#40 (1) { ["actual_size"]=> string(2) "20" } [8]=> object(stdClass)#41 (1) { ["actual_size"]=> string(2) "22" } [9]=> object(stdClass)#42 (1) { ["actual_size"]=> string(2) "24" } [10]=> object(stdClass)#43 (1) { ["actual_size"]=> string(2) "26" } [11]=> object(stdClass)#44 (1) { ["actual_size"]=> string(2) "28" } [12]=> object(stdClass)#45 (1) { ["actual_size"]=> string(2) "30" } [13]=> object(stdClass)#46 (1) { ["actual_size"]=> string(2) "32" } [14]=> object(stdClass)#47 (1) { ["actual_size"]=> string(2) "34" } [15]=> object(stdClass)#48 (1) { ["actual_size"]=> string(2) "36" } [16]=> object(stdClass)#49 (1) { ["actual_size"]=> string(2) "38" } [17]=> object(stdClass)#50 (1) { ["actual_size"]=> string(2) "40" } [18]=> object(stdClass)#51 (1) { ["actual_size"]=> string(2) "42" } [19]=> object(stdClass)#52 (1) { ["actual_size"]=> string(2) "44" } [20]=> object(stdClass)#53 (1) { ["actual_size"]=> string(2) "46" } [21]=> object(stdClass)#54 (1) { ["actual_size"]=> string(2) "48" } [22]=> object(stdClass)#55 (1) { ["actual_size"]=> string(2) "50" } [23]=> object(stdClass)#56 (1) { ["actual_size"]=> string(2) "52" } [24]=> object(stdClass)#57 (1) { ["actual_size"]=> string(2) "54" } [25]=> object(stdClass)#58 (1) { ["actual_size"]=> string(2) "56" } } } 


Now when I try to var_dump the same $data in the said view the result I get is NULL.

I have tried it with simple data too, but the variable is not being passed on with the write_view and gives NULL in each case.

I am using codeigniter 2.0 and template 1.4 with codeigniter being on basic configuration. Let me know if I need to give some added information and what is it that I am doing wrong or missing.

Thanks in advance!! Any help would be greatly appreciated.

 

Profile
 
 
Posted: 13 January 2012 03:02 AM   [ Ignore ]   [ # 147 ]  
Summer Student
Total Posts:  2
Joined  01-13-2012

Hi,

I use the library. Thank you for Labour.

this is my default page of the controller,

public function index($var NULL)
  
{
   
if ($var == NULL){$var "homepage";}else {$var $var;}
   $this
->template->write_view('content'$var.'/'.$var);
   
$this->template->render();   
  

views loading, but does not install the controller. Where do database transactions?. Is the main page or controls of the wiews.

Thanks.

Profile
 
 
   
15 of 15
15