Welcome Guest, Not a member yet? Register   Sign In
hmvc and helpers
#3

[eluser]boytun[/eluser]
Thanks wiredesignz. Smile

I just want to tell you that I'm beginner in CI, but about php5 I have the basics , so that why I ask many questions in the forum in order to learn and explore more the framework.
Smile

About my question,when I applay your notes, the error is disappeared, but I did not get the desired result concerned the title tag.
this is the modified code:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Page extends Frontend_Controller {

public function __construct()
{
  parent::__construct();


}

public function index()
{
  $this->load->model('page_m');
  $this->load->model('widget_m');
  $this->data['page']=$this->page_m->get_by(array('slug'=> (string)$this->uri->segment(1)),TRUE);
  $this->data['widgets']=$this->widget_m->get();
  //echo "<pre>";var_dump($this->data['page']);echo "</pre>";
  $methode="_".$this->data['page']->template;
  $this->$methode();
  $this->data['subview']=$this->data['page']->template;
  $ins= new Page();
  meta_titles($this->data['page']->title,$ins);
  $this->load->view('layout_main', $this->data);

}}

the helper:
Code:
&lt;?php

function meta_titles ($string,$ins)
{
//$CI =& get_instance();
$ins->data['meta_title']=$string.' - '.$ins->data['meta_title'];
/*echo "aaaa";
echo($CI->data['meta_title']);*/
}


Messages In This Thread
hmvc and helpers - by El Forum - 04-20-2013, 05:11 AM
hmvc and helpers - by El Forum - 04-20-2013, 05:56 AM
hmvc and helpers - by El Forum - 04-20-2013, 09:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB