Welcome Guest, Not a member yet? Register   Sign In
Assessment on how to ...
#1

[eluser]Ryann[/eluser]
im creating a layout that has 2 columns for the body (no problem with the header and footer).
my question is, how to load 2 views within the 2 columns respectively.

my idea is like choosing a menu on the left side then the content on the right side changes.. im a starter in CI so i cant do the simple problem of including menu (left side) and content (right side)

when i load my 2 views in my controller it just messed up with my table layout..
its like stacking up depending on how i load the views.

thanks
#2

[eluser]Ryann[/eluser]
another thing, do i have to put the views into a public array in the controller? so when i load the view i'll just call the array variable?
#3

[eluser]manilodisan[/eluser]
Have you tried loading a view from a view?
#4

[eluser]John_Betong[/eluser]
[quote author="Ryann" date="1224672001"]another thing, do i have to put the views into a public array in the controller? so when i load the view i'll just call the array variable?[/quote]
 
Take a look at the way I do it with Message:4
 
http://ellislab.com/forums/viewthread/90724/
 
You mentioned stacking of the partial views so I think your problem is with HTML/CSS
 
Try this in your view
Code:
...
   ...
   ...
  
    <div style='clear:both; width:90%; margin:1em auto; border:dotted'>

      <div style='width:12%; float:left; border:dotted'>
        <br />This is where your menu goes
        <br />menu item : 1  
        <br />menu item : 2  
        <br />menu item : 3  
        <br />menu item : 4
     </div>
  
      <div style='width:80%; float:right; border:dotted'>
        &lt;?= $content ?&gt;
      </div>

    </div>  
   ...
   ...
   ...
&nbsp;
&nbsp;
Try Google with "CSS two-column layouts"
&nbsp;
&nbsp;




Theme © iAndrew 2016 - Forum software by © MyBB