0 Пользователей и 1 Гость просматривают эту тему.
  • 0 Ответов
  • 3917 Просмотров
*

Tony Jones

  • Захожу иногда
  • 91
  • 0 / 0
  • Tony jones
menu, logo и header
« : 08.10.2014, 09:18:35 »
Ола компренде)

На варпе от YT пытаюсь создать шаблон.
Как сделать чтобы модули меню и лого на выходе вставали внутри моего кода, который я набираю в 3-ем модуле. ниже код, что имею, как выходит, что хочу.

Есть три модуля:
-меню
-лого
-модуль с кодом HTML (ниже код который вставляю внутрь модуля)
Спойлер
[свернуть]
Далее в файле theme.php
Код
<body class="<?php echo $this['config']->get('body_classes'); ?>">

<?php if (!$this['config']->get('layout_fullscreen', 0)) : ?>
    <div class="mcontent">
    <?php endif; ?>

    <head <?php echo $sticky_navigation; ?> >

<?php if ($this['widgets']->count('headerbar')) : ?>
<?php echo $this['widgets']->render('headerbar'); ?>
<?php endif; ?>

<?php if ($this['widgets']->count('menu + search')) : ?>
<nav class="navbar">

<?php if ($this['widgets']->count('menu')) : ?>
<?php echo $this['widgets']->render('menu'); ?>
<?php endif; ?>

<?php if ($this['widgets']->count('offcanvas')) : ?>
<a href="#offcanvas" class="uk-navbar-toggle uk-visible-small" data-uk-offcanvas></a>
<?php endif; ?>


<?php if ($this['widgets']->count('search')) : ?>
<div class="uk-navbar-flip">
<div class="uk-navbar-content uk-hidden-small"><?php echo $this['widgets']->render('search'); ?></div>
</div>
<?php endif; ?>

<?php if ($this['widgets']->count('logo')) : ?>
                <a class="header" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo'); ?></a>
                <?php endif; ?>

                <?php if ($this['widgets']->count('logo-small')) : ?>
                <a class="tm-logo uk-float-lef uk-visible-small" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo-small'); ?></a>
                <?php endif; ?>

</nav>
<?php endif; ?>
</head>
Вот что получается:
Код
<div class="mcontent">
   
   

<div class="header header-1">
<header class="header-1">
    <div class="container">
        <div class="row">
            <div class="navbar span12">
                <div class="navbar-inner">
                    <button type="button" class="btn btn-navbar"></button>
                 </div>
            </div>
        </div>
    </div>
</header>
<section class="header-1-sub">
    <div id="pt-main" class="page-transitions pt-perspective pt-item-1 pt-first">
        <div class="pt-page pt-page-1 bg-midnight-blue pt-page-current">
            <div class="background">&nbsp;</div>
            <div class="caption">
                <div class="container">
                    <h3>We’ve created the product that will help your
                        startup to look even better.</h3>
                    <p class="lead">You have the design, you have the code</p>
                </div>
            </div>
        </div>
        <div class="pt-page pt-page-2 bg-midnight-blue">
            <div class="background">&nbsp;</div>
            <div class="caption">
                <div class="container">
                    <h3>Example headline.</h3>
                    <p class="lead">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
                        labore et dolore magna aliqua.
                    </p>
                </div>
            </div>
        </div>
        <div class="pt-page pt-page-3 bg-midnight-blue">
            <div class="background">&nbsp;</div>
            <div class="caption">
                <div class="container">
                    <h3>Another example headline.</h3>
                    <p class="lead">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
                        labore et dolore magna aliqua.
                    </p>
                </div>
            </div>
        </div>
        <div class="container controls">
            <a class="control-prev" href="#"><span class="fui-arrow-left"><span style="font-family: 'Flat-UI-Icons'"></span> </span></a>
            <a class="control-next" href="#"><span class="fui-arrow-right"><span style="font-family: 'Flat-UI-Icons'"></span> </span></a>
        </div>
    </div>
</section></div>
<nav class="nav-collapse collapse">

<ul class="uk-navbar-nav uk-hidden-small"><li data-uk-dropdown="{}"><a href="/">Home</a></li><li class="uk-parent uk-active" data-uk-dropdown="{}"><a href="/index.php/features">Features</a><div class="uk-dropdown uk-dropdown-navbar uk-dropdown-width-1"><div class="uk-grid uk-dropdown-grid"><div class="uk-width-1-1"><ul class="uk-nav uk-nav-navbar"><li class="uk-active"><a href="/index.php/features/layouts">Layouts</a></li><li><a href="/index.php/features/uikit">UIkit</a></li></ul></div></div></div></li><li data-uk-dropdown="{}"><a href="/index.php/widgetkit">Widgetkit</a></li><li data-uk-dropdown="{}"><a href="/index.php/icons">Icons</a></li><li data-uk-dropdown="{}"><a href="/index.php/zoo">ZOO</a></li><li data-uk-dropdown="{}"><a href="/index.php/joomla"><img class="uk-responsive-height" src="/images/yootheme/menu/icon_joomla.svg" alt="Joomla"> Joomla</a></li></ul>





                <a class="header" href="http://localhost">
<img src="/images/yootheme/logo.svg" width="270" height="70" alt="Demo"></a>
               
                               
               
</nav>

<section class="tm-top-a uk-grid" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin="">
<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>
</section>

<section class="tm-top-b uk-grid" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin="">
<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-home"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-bookmark"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-music"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-map-marker"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>
</section>

<div class="tm-middle uk-grid" data-uk-grid-match="" data-uk-grid-margin="">

<div class="tm-main uk-width-medium-1-2">

<section class="tm-main-top uk-grid" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin="">
<div class="uk-width-1-1 uk-width-medium-1-2"><div class="uk-panel uk-panel-box"><div class="uk-panel-badge uk-badge uk-badge-success">Badge</div><h3 class="uk-panel-title"> Main Top</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-2"><div class="uk-panel uk-panel-box"><div class="uk-panel-badge uk-badge uk-badge-danger">Badge</div><h3 class="uk-panel-title">Main Top</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>
</section>
Вывод должен быть таким
Код
<div class="mcontent">
   
   

<div class="header header-1">
<header class="header-1">
    <div class="container">
        <div class="row">
            <div class="navbar span12">
                <div class="navbar-inner">
                    <button type="button" class="btn btn-navbar"></button>
<a class="header" href="http://localhost">
   <img src="/images/yootheme/logo.svg" width="270" height="70" alt="Demo"></a>
<div class="nav-collapse collapse">
<ul class="nav pull-right">
<li data-uk-dropdown="{}"><a href="/">Home</a></li>
<li class="uk-parent uk-active" data-uk-dropdown="{}"><a href="/index.php/features">Features</a>
<div class="uk-dropdown uk-dropdown-navbar uk-dropdown-width-1">
<div class="uk-grid uk-dropdown-grid">
<div class="uk-width-1-1">
<ul class="uk-nav uk-nav-navbar">
<li class="uk-active"><a href="/index.php/features/layouts">Layouts</a></li>
<li><a href="/index.php/features/uikit">UIkit</a></li>
</ul></div></div></div></li><li data-uk-dropdown="{}"><a href="/index.php/widgetkit">Widgetkit</a></li><li data-uk-dropdown="{}"><a href="/index.php/icons">Icons</a></li><li data-uk-dropdown="{}"><a href="/index.php/zoo">ZOO</a></li><li data-uk-dropdown="{}"><a href="/index.php/joomla"><img class="uk-responsive-height" src="/images/yootheme/menu/icon_joomla.svg" alt="Joomla"> Joomla</a></li></ul>                        
                                                
                            
                     </div>

                 
Код
</div>
            </div>
        </div>
    </div>
</header>
<section class="header-1-sub">
    <div id="pt-main" class="page-transitions pt-perspective pt-item-1 pt-first">
        <div class="pt-page pt-page-1 bg-midnight-blue pt-page-current">
            <div class="background">&nbsp;</div>
            <div class="caption">
                <div class="container">
                    <h3>We’ve created the product that will help your
                        startup to look even better.</h3>
                    <p class="lead">You have the design, you have the code</p>
                </div>
            </div>
        </div>
        <div class="pt-page pt-page-2 bg-midnight-blue">
            <div class="background">&nbsp;</div>
            <div class="caption">
                <div class="container">
                    <h3>Example headline.</h3>
                    <p class="lead">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
                        labore et dolore magna aliqua.
                    </p>
                </div>
            </div>
        </div>
        <div class="pt-page pt-page-3 bg-midnight-blue">
            <div class="background">&nbsp;</div>
            <div class="caption">
                <div class="container">
                    <h3>Another example headline.</h3>
                    <p class="lead">
                        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut
                        labore et dolore magna aliqua.
                    </p>
                </div>
            </div>
        </div>
        <div class="container controls">
            <a class="control-prev" href="#"><span class="fui-arrow-left"><span style="font-family: 'Flat-UI-Icons'"></span> </span></a>
            <a class="control-next" href="#"><span class="fui-arrow-right"><span style="font-family: 'Flat-UI-Icons'"></span> </span></a>
        </div>
    </div>
</section></div>


<section class="tm-top-a uk-grid" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin="">
<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box"><h3 class="uk-panel-title">Top A</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>
</section>

<section class="tm-top-b uk-grid" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin="">
<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-home"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-bookmark"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-music"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-4"><div class="uk-panel uk-panel-box uk-panel-box-secondary"><h3 class="uk-panel-title"><i class="uk-icon-map-marker"></i> Top B</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>
</section>

<div class="tm-middle uk-grid" data-uk-grid-match="" data-uk-grid-margin="">

<div class="tm-main uk-width-medium-1-2">

<section class="tm-main-top uk-grid" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin="">
<div class="uk-width-1-1 uk-width-medium-1-2"><div class="uk-panel uk-panel-box"><div class="uk-panel-badge uk-badge uk-badge-success">Badge</div><h3 class="uk-panel-title"> Main Top</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>

<div class="uk-width-1-1 uk-width-medium-1-2"><div class="uk-panel uk-panel-box"><div class="uk-panel-badge uk-badge uk-badge-danger">Badge</div><h3 class="uk-panel-title">Main Top</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</div></div>
</section>
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Автоматическое скрытие offcanvas-menu в Helix Ultimate

Автор newalex

Ответов: 2
Просмотров: 589
Последний ответ 18.10.2019, 10:24:08
от newalex