Welcome Guest, Not a member yet? Register   Sign In
Making a shared block with data
#1

[eluser]Unknown[/eluser]
I’m kind of new to this framework.

Can I know how do I make a proper shared block that contains pulled data from the database?

For example a “Featured product block” where I can located in different pages?

Product Controller

Code:
public function featured_product_block(){
  $product_array = $this->product_model->get_product();
  $data["products"] = $product_array;
  $this->load->view("blocks/product_block", $data);
}

So do I just call this controller from another controller? Or is there another way to do it?


Messages In This Thread
Making a shared block with data - by El Forum - 09-18-2014, 08:23 AM
Making a shared block with data - by El Forum - 09-18-2014, 08:43 AM
Making a shared block with data - by El Forum - 09-18-2014, 04:45 PM
Making a shared block with data - by El Forum - 09-18-2014, 06:12 PM
Making a shared block with data - by El Forum - 09-18-2014, 08:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB