Commit 4e14e86b authored by Zachary Doll's avatar Zachary Doll

Include the action name in the breadcrumbs

parent dd8bbae5
......@@ -155,6 +155,7 @@ class YagaHooks implements Gdn_IPlugin {
// Tell the ProfileController what tab to load
$Sender->GetUserInfo($UserReference, $Username);
$Sender->_SetBreadcrumbs(T('Yaga.Reactions'), UserUrl($Sender->User, '', 'reactions'));
$Sender->SetTabView(T('Yaga.Reactions'), 'reactions', 'profile', 'Yaga');
$Sender->AddJsFile('jquery.expander.js');
......@@ -177,16 +178,18 @@ class YagaHooks implements Gdn_IPlugin {
$Sender->Head->AddTag('meta', array('name' => 'robots', 'content' => 'noindex,noarchive'));
}
$ReactionModel = Yaga::ReactionModel();
// Build a pager
$BaseUrl = 'profile/reactions/' . $Sender->User->UserID . '/' . Gdn_Format::Url($Sender->User->Name) . '/' . $ActionID;
$PagerFactory = new Gdn_PagerFactory();
$Sender->Pager = $PagerFactory->GetPager('Pager', $Sender);
$Sender->Pager->ClientID = 'Pager';
$Sender->Pager->Configure(
$Offset, $Limit, $Data->TotalRecords, 'profile/reactions/' . $Sender->User->UserID . '/' . Gdn_Format::Url($Sender->User->Name) . '/' . $ActionID . '/%1$s/'
$Offset, $Limit, $Data->TotalRecords, $BaseUrl . '/%1$s/'
);
// Add the specific action to the breadcrumbs
$action = Yaga::ActionModel()->GetID($ActionID);
$Sender->Data['Breadcrumbs'][] = array('Name' => $action->Name, 'Url' => $BaseUrl);
// Render the ProfileController
$Sender->Render();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment