Elgg  Version 3.0
index.php
Go to the documentation of this file.
1 <?php
2 
4 
5 if ($user) {
6  $title = elgg_echo('welcome:user', [$user->getDisplayName()]);
7  $sidebar = null;
8 } else {
9  $title = elgg_echo('welcome');
10  $sidebar = elgg_view('core/account/login_box');
11 }
12 
14  'title' => $title,
15  'content' => elgg_echo('index:content'),
16  'sidebar' => $sidebar,
17 ];
18 $body = elgg_view_layout('one_sidebar', $params);
19 
$body
Definition: index.php:18
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$user
Definition: index.php:3
elgg_view_page($title, $body, $page_shell= 'default', $vars=[])
Assembles and outputs a full page.
Definition: views.php:360
$title
Definition: user.php:20
$sidebar
Definition: index.php:10
elgg echo
Translates a string.
Definition: languages.js:43
$params
Definition: index.php:13
elgg_view_layout($layout_name, $vars=[])
Displays a layout with optional parameters.
Definition: views.php:593
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:29
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246