marcislaw
16-05-2014, 12:53
Witam jak w temacie chciałbym stworzyć własny szablon w joomla. Analizując inne szablony zauważyłem definiowane klasy, divy w pliku css, które jednak nie znajdują się ( nie są wywoływane w pliku php) przykład poniżej fragment pliku css:
.module_menu .menu,
.module .menu
{ margin:0;}
.module_menu .menu li,
.module .menu li
{ padding:0 0 0 10px;line-height:20px;}
.module_menu .menu li a,
.module .menu li a
{ display:block;}
.module_menu .menu li a span,
.module .menu li a span
{
color: #888888;
font-size: 11px;
font-weight: 400;
line-height: 16px;
text-decoration: none;
}
.module_menu .menu li a:hover span, .module .menu li a:hover span {
text-decoration: underline;
color: #65AFEE;
}
W pliku index.php przedstawione powyżej klasy nie są wywoływane w jaki więc sposób są one uwzględniane w zainstalowanym szablonie
poniżej plik index.php tego szablonu:
<?php
defined('_JEXEC') or die;
JHTML::_('behavior.framework', true);
/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
$tplparams = $app->getTemplate(true)->params;
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
<!-- The following line loads the template CSS file located in the template folder. -->
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<!-- The following line loads the template JavaScript file located in the template folder. It's blank by default. -->
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/CreateHTML5Elements.js"></script>
</head>
<body class="page_bg">
<header>
<div class="sitename">
<h1><a href="<?php echo $this->baseurl ?>"><?php echo $app->getCfg('sitename'); ?></a></h1>
</div>
<div id="search">
<jdoc:include type="modules" name="position-0" />
</div>
</header>
<div class="top-menu">
<div id="sgmenu">
<table cellspacing="0" cellpadding="0" border="0" style="margin:0 auto;">
<tr>
<td>
<jdoc:include type="modules" name="menuload" />
</td>
</tr>
</table>
</div>
</div>
<div class="wrapcont">
<section id="content">
<?php if( $this->countModules('position-7') ) : ?>
<div class="maincol">
<?php elseif( !$this->countModules('position-7') and ($this->countModules('position-4') ) ) : ?>
<div class="maincol_w_left">
<?php elseif( $this->countModules('position-7') and (!$this->countModules('position-4') ) ) : ?>
<div class="maincol_w_right">
<?php else: ?>
<div class="maincol_full">
<?php endif; ?>
<?php if( $this->countModules('position-7') ) : ?>
<div class="leftcol">
<jdoc:include type="modules" name="position-7" style="rounded"/>
</div>
<?php endif; ?>
<div class="cont">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<?php if( $this->countModules('position-4') ) : ?>
<div class="rightcol">
<jdoc:include type="modules" name="position-4" style="rounded"/>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
</div></div></div>
</section>
</div>
<footer>
<p style="text-align:center;"><?php $sg = ''; include "templates.php"; ?></p>
</footer>
</body>
Proszę o wyjaśnienie tej kwestii gdyż bez tego nie potrafię samodzielnie budować własnych szablonów dla joomla. Z góry dziękuję za każdą okazana pomoc i przepraszam jeśli temat gdzieś już się pojawił jednak ja nie potrafiłem podobnego problemu tu wyszukać:obojetny:
.module_menu .menu,
.module .menu
{ margin:0;}
.module_menu .menu li,
.module .menu li
{ padding:0 0 0 10px;line-height:20px;}
.module_menu .menu li a,
.module .menu li a
{ display:block;}
.module_menu .menu li a span,
.module .menu li a span
{
color: #888888;
font-size: 11px;
font-weight: 400;
line-height: 16px;
text-decoration: none;
}
.module_menu .menu li a:hover span, .module .menu li a:hover span {
text-decoration: underline;
color: #65AFEE;
}
W pliku index.php przedstawione powyżej klasy nie są wywoływane w jaki więc sposób są one uwzględniane w zainstalowanym szablonie
poniżej plik index.php tego szablonu:
<?php
defined('_JEXEC') or die;
JHTML::_('behavior.framework', true);
/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
$tplparams = $app->getTemplate(true)->params;
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<jdoc:include type="head" />
<!-- The following line loads the template CSS file located in the template folder. -->
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
<!-- The following line loads the template JavaScript file located in the template folder. It's blank by default. -->
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/CreateHTML5Elements.js"></script>
</head>
<body class="page_bg">
<header>
<div class="sitename">
<h1><a href="<?php echo $this->baseurl ?>"><?php echo $app->getCfg('sitename'); ?></a></h1>
</div>
<div id="search">
<jdoc:include type="modules" name="position-0" />
</div>
</header>
<div class="top-menu">
<div id="sgmenu">
<table cellspacing="0" cellpadding="0" border="0" style="margin:0 auto;">
<tr>
<td>
<jdoc:include type="modules" name="menuload" />
</td>
</tr>
</table>
</div>
</div>
<div class="wrapcont">
<section id="content">
<?php if( $this->countModules('position-7') ) : ?>
<div class="maincol">
<?php elseif( !$this->countModules('position-7') and ($this->countModules('position-4') ) ) : ?>
<div class="maincol_w_left">
<?php elseif( $this->countModules('position-7') and (!$this->countModules('position-4') ) ) : ?>
<div class="maincol_w_right">
<?php else: ?>
<div class="maincol_full">
<?php endif; ?>
<?php if( $this->countModules('position-7') ) : ?>
<div class="leftcol">
<jdoc:include type="modules" name="position-7" style="rounded"/>
</div>
<?php endif; ?>
<div class="cont">
<jdoc:include type="message" />
<jdoc:include type="component" />
</div>
<?php if( $this->countModules('position-4') ) : ?>
<div class="rightcol">
<jdoc:include type="modules" name="position-4" style="rounded"/>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
</div></div></div>
</section>
</div>
<footer>
<p style="text-align:center;"><?php $sg = ''; include "templates.php"; ?></p>
</footer>
</body>
Proszę o wyjaśnienie tej kwestii gdyż bez tego nie potrafię samodzielnie budować własnych szablonów dla joomla. Z góry dziękuję za każdą okazana pomoc i przepraszam jeśli temat gdzieś już się pojawił jednak ja nie potrafiłem podobnego problemu tu wyszukać:obojetny: