[eluser]omerorhan[/eluser]
Hello I am new on Code Igniter.
I build a vertical menu like below.
Code:
function menu($lft = 1){
$node = $this->MPTtree->get_ORM($lft);
if($lft == 1)
{
$str = '<ul id="MenuBar1" class="MenuBarVertical">';
}
else
{
$str = '<ul>';
}
foreach($node->children() as $child){
$str .= "<li>";
$str .= "<a href='#'>".$child->get('title')."</a>";
if($child->count_children())
{
$str .= $this->menu($child->get('lft'));
}
$str .= "</li>";
}
$str .= "</ul>";
return $str;
}
}
I wanna have two tables.
1 - Pages - Contains the page contents , names and etc.
2 - Page_list - For Mapping pages
I will build the ul list with the second table. (reference to MPTtree Model table)
But, I want to list
pages name from the first table's name field.
I know I could join to first table.
But how??
Should i modify $this->MPTtree->get_ORM() method? or is there another way?
or what? and HOW?
I hope i could explain my problem.