[eluser]dimaomni[/eluser]
Hi all,
In general:
I have three column site. Each column is located in own view. Left column has menu. I want to display different content in middle column when I click on links.
What is best practice for this task?
I try do it by 2 ways:
- Send via GET view's file name and insert this value to $this->load->view($contentName);
and it worked, however displayed page were incorrect displayed.
- then I tried in middle column(separate view) to use require "". and nothing change as for me.
controller cmain:
Code:
public function index($ilinkId)
{
$data['content'] = $ilinkId;
$this->load->view('front/vheader');
$this->load->view('front/vcontent', $data);
$this->load->view('front/vleftmenu');
$this->load->view('front/vrightmenu');
$this->load->view('front/vfooter');
view vcontent:
Code:
<?php
if ($content == NULL)
{
$content = "vgreeting";
}
require "content/".$content.".php ";
?>
view vleftmenu:
Code:
<li><?php echo anchor('front/cmain/index/vabout', 'About');?></li>
Now it seems that css doesn't load when I click on the link. Why ???
file structure(short):
/site
|
|_images
| |_a lot of
|-style
| |_ style.css
|
|__application
| |_controllers
| | |_front
| | |_cmain.php
| |_view
| | |_front
| | |_vcontent.php ...etc
|_index.php
thank you in advance!