Joomla 1.6 Шапка для шаблона

Тема в разделе "Создание шаблона", создана пользователем skorpion97, 03.02.2012.

  1. Offline

    skorpion97 Недавно здесь

    Регистрация:
    02.02.2012
    Сообщения:
    2
    Симпатии:
    0
    Пол:
    Мужской
    Я однажды переделал шаблон от SiteGround под себя, вот и он:

    index.php:

    Код (CODE):
    1. <?php
    2. /**
    3.  * @version     $Id: index.php $
    4.  * @package     Joomla.Site
    5.  * @copyright   Copyright (C) 2009 - 2011 SiteGround.com - All Rights Reserved.
    6.  * @license     GNU General Public License version 3 or later; see LICENSE.txt
    7.    
    8.  *  This program is free software: you can redistribute it and/or modify
    9.  *  it under the terms of the GNU General Public License as published by
    10.  *  the Free Software Foundation, either version 3 of the License, or
    11.  *  (at your option) any later version.
    12.  
    13.  *  This program is distributed in the hope that it will be useful,
    14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16.  *  GNU General Public License for more details.
    17.  
    18.  *  You should have received a copy of the GNU General Public License
    19.  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    20.  */
    21.  
    22. // No direct access.
    23. defined('_JEXEC') or die;
    24.  
    25. JHTML::_('behavior.framework', true);
    26.  
    27. /* The following line gets the application object for things like displaying the site name */
    28. $app = JFactory::getApplication();
    29. $tplparams  = $app->getTemplate(true)->params;
    30.  
    31. $sliding_background = $tplparams->get('sliding_background');
    32.  
    33. ?>
    34. <!DOCTYPE html>
    35. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
    36. <head>
    37.     <jdoc:include type="head" />
    38.     <!-- The following line loads the template CSS file located in the template folder. -->
    39.     <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
    40.    
    41.     <!-- The following line loads the template JavaScript file located in the template folder. It's blank by default. -->
    42.    
    43.     <script type="text/javascript" src="http://davidwalsh.name/dw-content/mootools-1.3.js"></script>
    44.     <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/CreateHTML5Elements.js"></script>
    45.     <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery-1.4.4.min.js"></script>
    46.     <script type="text/javascript">jQuery.noConflict();</script>
    47.     <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/sgmenu.js"></script>
    48.     <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/AnimateBG.js"></script>
    49. </head>
    50.  
    51. <body class="page_bg" <?php if($sliding_background) : ?> id="page_bg" <?php endif; ?>>
    52.     <div class="wrapper">
    53.     <!--<header>
    54.         <h1><a href="<?php echo $this->baseurl ?>"><?php echo $app->getCfg('sitename'); ?></a></h1>
    55.        
    56.         <div class="top-menu">
    57.             <div id="sgmenu">
    58.                 <jdoc:include type="modules" name="menuload" />
    59.             </div>
    60.         </div>
    61.            
    62.         <div id="search">
    63.             <jdoc:include type="modules" name="position-0" />
    64.         </div>
    65.     </header> */-->
    66.     <div align="center"><img class="headimg" src="../images/had.png"></img></div>
    67.     <div class="topround"></div>
    68.     <section id="content">
    69.         <?php if( ($this->countModules('position-7')) and ($this->countModules('position-4')) ) : ?>
    70.         <div class="maincol">              
    71.         <?php elseif( !$this->countModules('position-7') and ($this->countModules('position-4') ) ) : ?>
    72.         <div class="maincol_w_left">
    73.         <?php elseif( ($this->countModules('position-7')) and (!$this->countModules('position-4') ) ) : ?>
    74.         <div class="maincol_w_right">
    75.         <?php else: ?>
    76.         <div class="maincol_full">
    77.         <?php endif; ?>
    78.        
    79.         <?php if( $this->countModules('position-7') ) : ?>
    80.             <div class="leftcol">
    81.                 <jdoc:include type="modules" name="position-7" style="rounded"/>
    82.             </div>
    83.             <?php endif; ?>
    84.            
    85.                 <div class="cont">
    86.                     <jdoc:include type="message" />
    87.                     <jdoc:include type="component" />
    88.                 </div>
    89.            
    90.         <?php if( $this->countModules('position-4') ) : ?>
    91.             <div class="rightcol">
    92.                 <jdoc:include type="modules" name="position-4" style="rounded"/>
    93.             </div>
    94.         <?php endif; ?>
    95.         <div class="clr"></div>
    96.         </div>
    97.     </section>
    98.     <div class="bottomround"></div>
    99.     <div class="pusher"></div>
    100.     </div>
    101.     <footer>
    102.     <p style="text-align:center;"><?php $sg = ''; include "templates.php"; ?></p>
    103.     </footer>
    104. </body>
    105. </html>


    Суть в том что я хочу добавить шапку в самом верху, кодом:

    Код (CODE):
    1. <div align="center"><img class="headimg" src="../images/had.png"></img></div>


    Но ничего не получается! Помогите с проблемой!
     
  2.  

Поделиться этой страницей

Загрузка...