diff options
Diffstat (limited to 'mod/pages/views/default/pages/breadcrumbs.php')
-rw-r--r-- | mod/pages/views/default/pages/breadcrumbs.php | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/mod/pages/views/default/pages/breadcrumbs.php b/mod/pages/views/default/pages/breadcrumbs.php index eddcfa7df..a6626ca39 100644 --- a/mod/pages/views/default/pages/breadcrumbs.php +++ b/mod/pages/views/default/pages/breadcrumbs.php @@ -4,25 +4,25 @@ $parent = $vars['parent']; $breadcrumbs = ''; - t - t$owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username; - techo "<div id='breadcrumbs'><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>"; - t - t//see if the new page's parent has a parent -tt$getparent = get_entity($parent->parent_guid); -ttwhile ($getparent instanceof ElggObject){ -ttt -ttt $breadcrumbs = " > <a href=\"{$getparent->getURL()}\">$getparent->title</a>" . $breadcrumbs; -ttt $getparent = get_entity($getparent->parent_guid); -ttt -tt} -tt -ttecho $breadcrumbs; -tt//if it is adding a page, make the last page a link, otherwise, don't -ttif($vars['add']){ - ttecho " > <a href=\"{$parent->getURL()}\">$parent->title</a></div>"; -tt}else{ -tttecho " > $parent->title</div>"; -tt} + + $owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username; + echo "<div id='breadcrumbs'><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>"; + + //see if the new page's parent has a parent + $getparent = get_entity($parent->parent_guid); + while ($getparent instanceof ElggObject){ + + $breadcrumbs = " > <a href=\"{$getparent->getURL()}\">$getparent->title</a>" . $breadcrumbs; + $getparent = get_entity($getparent->parent_guid); + + } + + echo $breadcrumbs; + //if it is adding a page, make the last page a link, otherwise, don't + if($vars['add']){ + echo " > <a href=\"{$parent->getURL()}\">$parent->title</a></div>"; + }else{ + echo " > $parent->title</div>"; + } ?> |