Skip to content

Commit

Permalink
Correct positions main-top and main-bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
drmenzelit committed Dec 28, 2021
1 parent efafbd1 commit 6aefdcf
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 36 deletions.
64 changes: 34 additions & 30 deletions index.php
Expand Up @@ -16,20 +16,20 @@

/** @var Joomla\CMS\Document\HtmlDocument $this */

$app = Factory::getApplication();
$wa = $this->getWebAssetManager();
$document = $app->getDocument();
$app = Factory::getApplication();
$wa = $this->getWebAssetManager();
$document = $app->getDocument();

// Detecting Active Variables
$option = $app->input->getCmd('option', '');
$view = $app->input->getCmd('view', '');
$layout = $app->input->getCmd('layout', '');
$task = $app->input->getCmd('task', '');
$itemid = $app->input->getCmd('Itemid', '');
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
$menu = $app->getMenu();
$pageclass = $menu->getActive() !== null ? $menu->getActive()->getParams()->get('pageclass_sfx', '') : '';
$params = $this->params;
$option = $app->input->getCmd('option', '');
$view = $app->input->getCmd('view', '');
$layout = $app->input->getCmd('layout', '');
$task = $app->input->getCmd('task', '');
$itemid = $app->input->getCmd('Itemid', '');
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
$menu = $app->getMenu();
$pageclass = $menu->getActive() !== null ? $menu->getActive()->getParams()->get('pageclass_sfx', '') : '';
$params = $this->params;

// Template path
$templatePath = 'templates/' . $this->template;
Expand Down Expand Up @@ -80,7 +80,7 @@

if ($paramsFontScheme)
{
$assetFontScheme = 'fontscheme.' . $paramsFontScheme;
$assetFontScheme = 'fontscheme.' . $paramsFontScheme;
$wa->registerAndUseStyle($assetFontScheme, $templatePath . '/css/global/' . $paramsFontScheme . '.css');
$this->getPreloadManager()->preload($wa->getAsset('style', $assetFontScheme)->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']);
}
Expand Down Expand Up @@ -238,33 +238,37 @@

<main id="main" tabindex="-1">
<div class="wrapper">
<?php if ($this->countModules('main-top', true)) : ?>
<jdoc:include type="modules" name="main-top" />
<?php endif; ?>

<jdoc:include type="message" />

<div class="main-content <?php echo $hasClass; ?>">
<?php if (($params->get('sidebar') == 0) && ($this->countModules('sidebar-left', true))) : ?>
<div class="container-sidebar sidebar--left">
<jdoc:include type="modules" name="sidebar-left" style="html5" />
</div>
<div class="main-content <?php echo $hasClass; ?>">

<?php if (($params->get('sidebar') == 0) && ($this->countModules('sidebar-left', true))) : ?>
<div class="container-sidebar sidebar--left">
<jdoc:include type="modules" name="sidebar-left" style="html5" />
</div>
<?php endif; ?>

<div class="container-content">

<?php if ($this->countModules('main-top', true)) : ?>
<jdoc:include type="modules" name="main-top" />
<?php endif; ?>

<jdoc:include type="component" />

<?php if (($params->get('sidebar') == 1) && ($this->countModules('sidebar-right', true))) : ?>
<div class="container-sidebar sidebar--right">
<jdoc:include type="modules" name="sidebar-right" style="html5" />
</div>
<?php if ($this->countModules('main-bottom', true)) : ?>
<jdoc:include type="modules" name="main-bottom" />
<?php endif; ?>

</div>
</div>

<?php if ($this->countModules('main-bottom', true)) : ?>
<jdoc:include type="modules" name="main-bottom" />
<?php endif; ?>
<?php if (($params->get('sidebar') == 1) && ($this->countModules('sidebar-right', true))) : ?>
<div class="container-sidebar sidebar--right">
<jdoc:include type="modules" name="sidebar-right" style="html5" />
</div>
<?php endif; ?>

</div>
</div>
</main>

Expand Down
4 changes: 2 additions & 2 deletions templateDetails.xml
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="template" client="site" method="upgrade">
<name>nature</name>
<version>1.0.2</version>
<version>1.0.3</version>
<creationDate>February 2021</creationDate>
<author>Viviana Menzel</author>
<authorEmail>info@dr-menzel-it.de</authorEmail>
<copyright>(C) 2021 Dr. Menzel IT</copyright>
<description>TPL_NATURE_XML_DESCRIPTION</description>
<updateservers>
<updateservers>
<server type="extension" name="Nature Update Site">https://raw.githubusercontent.com/drmenzelit/nature-j4-template/master/update.xml</server>
</updateservers>
<files>
Expand Down
8 changes: 4 additions & 4 deletions update.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" ?>
<updates>
<update>
<name>Nature 1.0.2</name>
<name>Nature 1.0.3</name>
<description>Nature J4 Template</description>
<element>nature</element>
<type>template</type>
<client>site</client>
<version>1.0.2</version>
<version>1.0.3</version>
<infourl title="Nature J4 Template">https://github.com/drmenzelit/nature-j4-template</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/drmenzelit/nature-j4-template/releases/download/1.0.2/nature-j4-template-1.0.2.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/drmenzelit/nature-j4-template/releases/download/1.0.3/nature-j4-template-1.0.3.zip</downloadurl>
</downloads>
<sha512>eb4362cbaafa45b32eaa528ebd3e922571f01b6f4fe07b1741a13d19eacc3f01388842b91778d7988695fbcfad63961aa3aebed12a3f47491489347d0a77711e</sha512>
<sha512>995c60ad531307efaeb00f5efef26b49494f4bad64751bc53642b68fa7e9e251fbbc914ebade28a78e6a58cd7df4d0fbc8960ccc58141f4a76d63af6cda3f652</sha512>
<maintainer>Viviana Menzel</maintainer>
<maintainerurl>https://www.dr-menzel-it.de</maintainerurl>
<php_minimum>7.2.5</php_minimum>
Expand Down

0 comments on commit 6aefdcf

Please sign in to comment.