
old code:
Code: Select all
// snip... //
$onenode->parent = false;
$count++;
if (isset($gCms->variables['content_id']) && $onenode->id == $gCms->variables['content_id'])
$onenode->current = true;
else
{
$onenode->current = false;
//So, it's not current. Lets check to see if it's a direct parent
if (strstr($gCms->variables["friendly_position"] . '.', $content->Hierarchy() . '.') == $gCms->variables["friendly_position"] . '.')
{
$onenode->parent = true;
}
}
// snip... //
Code: Select all
// snip... //
$onenode->parent = false;
$onenode->sister = false;
$count++;
if (isset($gCms->variables['content_id']) && $onenode->id == $gCms->variables['content_id'])
$onenode->current = true;
else
{
$onenode->current = false;
//So, it's not current. Lets check to see if it's a direct parent
if (strstr($gCms->variables["friendly_position"] . '.', $content->Hierarchy() . '.') == $gCms->variables["friendly_position"] . '.')
{
$onenode->parent = true;
}
//If it is not current or parent then it might be sister...
else if (substr($gCms->variables["friendly_position"], 0, -2) == substr($content->Hierarchy(), 0, -2))
{
$onenode->sister = true;
}
}
// snip... //
Keep up the good work with the CMS,
Rallu