diff options
-rw-r--r-- | pages/members/search.php | 7 | ||||
-rw-r--r-- | views/default/layout/shells/one_sidebar.php | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/pages/members/search.php b/pages/members/search.php index f21f72fc4..45df46a76 100644 --- a/pages/members/search.php +++ b/pages/members/search.php @@ -8,7 +8,6 @@ if ($vars['search_type'] == 'tag') { $tag = get_input('tag'); $title = elgg_echo('members:title:searchtag', array($tag)); - $content = elgg_view_title($title); $options = array(); $options['query'] = $tag; @@ -18,18 +17,18 @@ if ($vars['search_type'] == 'tag') { $results = elgg_trigger_plugin_hook('search', 'tags', $options, array()); $count = $results['count']; $users = $results['entities']; - $content .= elgg_view_entity_list($users, $count, $offset, $limit, false, false, true); + $content = elgg_view_entity_list($users, $count, $offset, $limit, false, false, true); } else { $name = get_input('name'); $title = elgg_echo('members:title:searchname', array($name)); - $content = elgg_view_title($title); elgg_set_context('search'); - $content .= list_user_search($name); + $content = list_user_search($name); } $params = array( + 'title' => $title, 'content' => $content, 'sidebar' => elgg_view('core/members/sidebar'), ); diff --git a/views/default/layout/shells/one_sidebar.php b/views/default/layout/shells/one_sidebar.php index c61088641..ed7700f5a 100644 --- a/views/default/layout/shells/one_sidebar.php +++ b/views/default/layout/shells/one_sidebar.php @@ -1,12 +1,13 @@ <?php /** - * Elgg main column with one sidebar layout + * Layout for main column with one sidebar * * @package Elgg * @subpackage Core * - * @uses $vars['content'] Content HTML for the main column + * @uses $vars['content'] Content HTML for the main column * @uses $vars['sidebar'] Optional content that is displayed in the sidebar + * @uses $vars['title'] Optional title for main content area * @uses $vars['class'] Additional class to apply to layout */ @@ -26,6 +27,9 @@ if (isset($vars['class'])) { <div class="elgg-main elgg-body"> <?php + if (isset($vars['title'])) { + echo elgg_view_title($vars['title']); + } // @todo deprecated so remove in Elgg 2.0 if (isset($vars['area1'])) { echo $vars['area1']; |