Welcome Guest, Not a member yet? Register   Sign In
Reuse HTML Block
#1

[eluser]Unknown[/eluser]
Hi Guys,

I am thinking how to achieve below:

I create HTML Block and want to reuse it in different locations within one page.
For example, I create one small category list basic different types, And what I plan is:
1, to create the HTML Block to be one view file.
2, fetch the data by types, and assign the data to the Block view and shows in main page.(I load the Block view in main page view.)
3, back to step 2, load one more again to create one more category list in the same page.

I already googled it and some guys said can ues "$string = $this->load->view('BlockView',$data,true)" to get the html string and then resend to other view.
But I found, the $data will become undefined in the BlockView file. Any one came across this issue?

Or, any one can share his way to reuse the HTML Block? Thanks in advance!


Messages In This Thread
Reuse HTML Block - by El Forum - 07-15-2011, 01:39 AM
Reuse HTML Block - by El Forum - 07-15-2011, 01:21 PM
Reuse HTML Block - by El Forum - 07-16-2011, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB