/** * show the sortkey, when it does not match title name * note that cl_sortkey is empty for CB_RootCond pager * @return sortkey html hint, when the sortkey differs from title name, empty string otherwise */ function addSortkey(Title $title_obj, stdClass $pager_row) { $this->initSortkeyTpl(); $result = ''; if (!empty($pager_row->cl_sortkey) && $title_obj->getText() != $pager_row->cl_sortkey) { // TODO: Get better context $cv = new CategoryViewer($title_obj, RequestContext::getMain()); $this->sortkey_hint = '(' . $cv->getSubcategorySortChar($title_obj, $pager_row->cl_sortkey) . ')'; $result = CB_XML::toText($this->sortkey_hint_tpl); } return $result; }