-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex2.html
More file actions
144 lines (111 loc) · 3.93 KB
/
Copy pathindex2.html
File metadata and controls
144 lines (111 loc) · 3.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
/**
* @package tpl_joomla_london
*
* @author Eoin <your@email.com>
* @copyright A copyright
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @link http://your.url.com
*/
defined('_JEXEC') or die;
use \Joomla\CMS\Factory;
$app = Factory::getApplication();
$doc = Factory::getDocument();
$user = Factory::getUser();
$this->language = $doc->language;
$this->direction = $doc->direction;
// Output as HTML5
$doc->setHtml5(true);
// Getting params from template
$params = $app->getTemplate(true)->params;
// 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 = $app->get('sitename');
/* Component? */
$component = ($this->params->get('mainoutput'));
// Count Module Positions
function modulesAvailable($position) {
$position = ($doc->countModules($position));
}
/*
$banners = ($this->countModules('banners'));
$debug = ($this->countModules('debug'));
$offcanvas = ($this->countModules('offcanvas'));
$head = ($this->countModules('head'));
$mainBanner = ($this->countModules('mainBanner'));
$belowBanner = ($this->countModules('belowBanner'));
$middle = ($this->countModules('middle'));
$bottom = ($this->countModules('bottom'));
$footer = ($this->countModules('footer'));
$belowFooter = ($this->countModules('belowFooter'));
*/
// Avoids reusing $this->baseurl . templates . $this->template
$templateUrl = $this->baseurl . '/templates/' . $this->template;;
$doc->addScriptVersion($templateUrl . '/js/template.js', array('version' => 'auto'));
// Add Stylesheets
$doc->addStyleSheetVersion($templateUrl . '/css/template.css', array('version' => 'auto'));
// Check for a custom CSS file
$userCss = JPATH_SITE . '/templates/' . $this->template . '/css/user.css';
if (file_exists($userCss) && filesize($userCss) > 0)
{
$this->addStyleSheetVersion($templateUrl . '/css/user.css', array('version' => 'auto'));
}
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
</head>
<body>
<!-- Body -->
<div class="body">
<a href="<?php echo $this->baseurl; ?>/">
<?php if ($this->params->get('sitedescription')) : ?>
<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription'), ENT_COMPAT, 'UTF-8') . '</div>'; ?>
<?php endif; ?>
</a>
<?php if (modulesAvailable(offcanvas)) : ?>
<jdoc:include type="modules" name="<?php $position ?>" style="none" />
<?php endif ?>
<?php if (modulesAvailable(head)) : ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
<?php if (modulesAvailable(mainBanner)) : ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
<?php if (modulesAvailable(belowBanner)) : ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
<?php if (modulesAvailable(middle)) : ?>
<?php if ($component == "1") : ?>
<jdoc:include type="message" />
<jdoc:include type="component" />
<?php endif ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
<?php if (modulesAvailable(bottom)) : ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
<?php if (modulesAvailable(footer)) : ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
<?php if (modulesAvailable(belowFooter)) : ?>
<jdoc:include type="modules" name=" <?php $position ?> />
<?php endif ?>
</div>
<!-- tpl_joomla_londonter -->
<belowFooter>
<jdoc:include type="modules" name="belowFooter" />
<p>
© <?php echo date('Y'); ?> <?php echo $sitename; ?>
</p>
</belowFooter>
<?php if (modulesAvailable(offcanvas)) : ?>
<jdoc:include type="modules" name="debug" style="none" />
<?php endif ?>
</body>
</html>