diff --git a/kalatheme.theme b/kalatheme.theme
index 9bff101..30b0042 100644
--- a/kalatheme.theme
+++ b/kalatheme.theme
@@ -6,6 +6,7 @@
*/
use Drupal\kalatheme\Utility\KalathemeFrameworkGetter;
+use Drupal\block\Entity\Block;
/**
* Implements hook_library_info_build().
@@ -35,6 +36,35 @@ function kalatheme_page_attachments_alter(array &$page) {
*/
function kalatheme_preprocess_page(array &$variables) {
KalathemeFrameworkGetter::initialize()->preprocessPage($variables);
+
+ // Get active theme
+ $theme = explode("/", \Drupal::theme()->getActiveTheme()->getPath());
+ $theme = end($theme);
+
+ // Load up the site branding block into a var.
+ // So we don't need to use a region or the block in content.
+ $brand = Block::load($theme . '_branding');
+ $variables['branding'] = \Drupal::entityManager()
+ ->getViewBuilder('block')
+ ->view($brand);
+
+ // Load up help block, same as above.
+ $help = Block::load($theme . '_help');
+ $variables['help'] = \Drupal::entityManager()
+ ->getViewBuilder('block')
+ ->view($help);
+
+ // Load up main menu, same as above.
+ $main_menu = Block::load($theme . '_main_menu');
+ $variables['main_menu'] = \Drupal::entityManager()
+ ->getViewBuilder('block')
+ ->view($main_menu);
+
+ // Load up user / account menu, same as above.
+ $acct_menu = Block::load($theme . '_account_menu');
+ $variables['acct_menu'] = \Drupal::entityManager()
+ ->getViewBuilder('block')
+ ->view($main_menu);
}
/**
diff --git a/templates/system/page.html.twig b/templates/system/page.html.twig
new file mode 100644
index 0000000..e9ac1c7
--- /dev/null
+++ b/templates/system/page.html.twig
@@ -0,0 +1,88 @@
+{#
+/**
+ * @file
+ * Theme override to display a single page.
+ *
+ * The doctype, html, head and body tags are not in this template. Instead they
+ * can be found in the html.html.twig template in this directory.
+ *
+ * Available variables:
+ *
+ * General utility variables:
+ * - base_path: The base URL path of the Drupal installation. Will usually be
+ * "/" unless you have installed Drupal in a sub-directory.
+ * - is_front: A flag indicating if the current page is the front page.
+ * - logged_in: A flag indicating if the user is registered and signed in.
+ * - is_admin: A flag indicating if the user has permission to access
+ * administration pages.
+ *
+ * Site identity:
+ * - front_page: The URL of the front page. Use this instead of base_path when
+ * linking to the front page. This includes the language domain or prefix.
+ *
+ * Page content (in order of occurrence in the default page.html.twig):
+ * - messages: Status and error messages. Should be displayed prominently.
+ * - node: Fully loaded node, if there is an automatically-loaded node
+ * associated with the page and the node ID is the second argument in the
+ * page's path (e.g. node/12345 and node/12345/revisions, but not
+ * comment/reply/12345).
+ *
+ * Regions:
+ * - page.content: The main content of the current page.
+ *
+ * @see template_preprocess_page()
+ * @see html.html.twig
+ */
+#}
+
+{%
+ set navbar_classes = [
+ 'navbar',
+ theme.settings.navbar_inverse ? 'navbar-inverse' : 'navbar-default',
+ theme.settings.navbar_position ? 'navbar-' ~ theme.settings.navbar_position|clean_class : '',
+ ]
+%}
+
+