Elgg  Version 5.1
body.php
Go to the documentation of this file.
1 <?php
10 
11 $isElggAtRoot = Elgg\Application::elggDir()->getPath() === ElggDirectory\Local::projectRoot()->getPath();
12 $elggSubdir = $isElggAtRoot ? '' : 'vendor/elgg/elgg/';
13 
15  'text' => elgg_echo('install:footer:instructions'),
16  'href' => 'http://learn.elgg.org/en/stable/intro/install.html',
17  'target' => '_blank',
18 ]));
19 $footer_menu_items .= elgg_format_element('li', [], elgg_view('output/url', [
20  'text' => elgg_echo('install:footer:troubleshooting'),
21  'href' => 'http://learn.elgg.org/en/stable/intro/install.html#troubleshooting',
22  'target' => '_blank',
23 ]));
24 $footer_menu_items .= elgg_format_element('li', [], elgg_view('output/url', [
25  'text' => elgg_echo('install:footer:community'),
26  'href' => 'https://elgg.org/discussion/all',
27  'target' => '_blank',
28 ]));
29 
30 $footer_menu = elgg_format_element('ul', ['class' => 'elgg-menu elgg-menu-footer'], $footer_menu_items);
31 
32 ?>
33 <div class="elgg-page">
34  <div class="elgg-page-body">
35  <div class="elgg-layout">
36  <div class="elgg-layout-columns">
37  <aside class="elgg-sidebar-alt" role="complementary">
38  <header class="elgg-page-header" role="banner">
39  <?php
40  echo elgg_format_element('img', [
41  'src' => elgg_get_site_url() . $elggSubdir . 'views/default/graphics/elgg_logo.png',
42  'alt' => 'Elgg',
43  ]);
44  ?>
45  </header>
46  <?php echo elgg_view('page/elements/sidebar', $vars); ?>
47  </aside>
48  <main class="elgg-body" role="main">
49  <?php
50  echo elgg_format_element('h1', [], (string) elgg_extract('title', $vars));
51  echo elgg_view('page/elements/messages', ['object' => elgg_extract('sysmessages', $vars)]);
52  echo elgg_extract('body', $vars);
53  ?>
54  </main>
55  </div>
56  </div>
57  </div>
58  <footer class="elgg-page-footer" role="contentinfo">
59  <?php echo $footer_menu; ?>
60  </footer>
61 </div>
62 <?php
63 
64 echo elgg_format_element('style', [], elgg_view('install.css'));
65 echo elgg_format_element('script', [], elgg_view('install.js'));
$isElggAtRoot
Elgg install body.
Definition: body.php:11
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$elggSubdir
Definition: body.php:12
$footer_menu_items
Definition: body.php:14
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:177
$footer_menu
Definition: body.php:30
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
$vars
Definition: theme.php:5
static elggDir()
Returns a directory that points to the root of Elgg, but not necessarily the install root...
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145