Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
walled_garden.php
Go to the documentation of this file.
1 <?php
13 $wg_body_class = 'elgg-body-walledgarden';
16  $wg_body_class .= ' hidden';
17  ob_start(); ?>
18 <script>
19 require(['elgg'], function (elgg) {
20  elgg.register_hook_handler('init', 'system', function() {
21  $('.registration_link').trigger('click');
22  });
23 });
24 </script>
25  <?php
26  $inline_js = ob_get_clean();
27 }
28 
29 // render content before head so that JavaScript and CSS can be loaded. See #4032
30 $messages = elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
31 $content = $vars["body"];
32 
33 ob_start(); ?>
34 <div class="elgg-page elgg-page-walledgarden">
35  <div class="elgg-page-messages">
36  <?php echo $messages ?>
37  </div>
38  <div class="<?php echo $wg_body_class; ?>">
39  <?php echo $content ?>
40  </div>
41 </div>
42 <?php
43 $body = ob_get_clean();
44 
45 $body .= elgg_view('page/elements/foot');
46 
47 $body .= $inline_js;
48 
49 $head = elgg_view('page/elements/head', $vars['head']);
50 
51 echo elgg_view("page/elements/html", array("head" => $head, "body" => $body));
$content
$wg_body_class
if($is_sticky_register) $messages
$is_sticky_register
Walled garden page shell.
$vars['entity']
$inline_js
$body
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
const elgg
Definition: elgg.js.php:92
elgg_is_sticky_form($form_name)
Does form submission data exist for this form?
Definition: input.php:131
$head