Показать сообщение отдельно
  #11 (permalink)  
Старый 08.10.2019, 11:23
Интересующийся
Отправить личное сообщение для alex_chz Посмотреть профиль Найти все сообщения от alex_chz
 
Регистрация: 08.10.2019
Сообщений: 14

Вот мой индекс шаблона
<?php
/*
 * ------------------------------------------------------------------------
 * Copyright (C) 2009 - 2013 The YouTech JSC. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: The YouTech JSC
 * Websites: http://www.smartaddons.com - http://www.cmsportal.net
 * ------------------------------------------------------------------------
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
header('X-UA-Compatible: IE=edge');

// Object of class YtTemplate
$doc     = JFactory::getDocument();
$app     = JFactory::getApplication();
$option = $app->input->get('option');

// Check yt plugin
if(!defined('YT_FRAMEWORK')) throw new Exception(JText::_('INSTALL_YT_PLUGIN'));
if(!defined('J_TEMPLATEDIR') )define('J_TEMPLATEDIR', JPATH_SITE.J_SEPARATOR.'templates'.J_SEPARATOR.$this->template);

// Include file: frame_inc.php
 include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'frame_inc.php');

// Check direction for html
$dir = ($doc->direction == 'rtl') ? ' dir="rtl"' : '';

/** @var YTFramework */
$responsive = $yt->getParam('layouttype');
$favicon     = $yt->getParam('favicon');
$layoutType    = $yt->getParam('layouttype');
$preloader    = $yt->getParam('preloader');
//Coming Soon
$this->baseUrl = JURI::base();
if($yt->getParam('comingsoon_mode')) header("Location: ".$this->baseUrl."?tmpl=comingsoon");

?>
<!DOCTYPE html>
<html <?php echo $dir; ?> lang="<?php echo $this->language; ?>">
<head>
    <jdoc:include type="head" />

    <meta name="HandheldFriendly" content="true"/>
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="YES" />

     <!-- META FOR IOS & HANDHELD -->
    <?php if($responsive=='res'): ?>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
    <?php endif ?>

    <!-- LINK FOR FAVICON -->
    <?php if($favicon) : ?>
        <link rel="icon" type="image/x-icon" href="<?php echo $favicon?>" />
    <?php endif; ?>

    <?php
    // Include css, js
    include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'head.php');
    ?>

  <!-- Global site tag (gtag.js) - Google Ads: 706973679 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-706973679"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-706973679');
</script>
  <!-- Event snippet for Кнопка перехода conversion page
In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->
<script>
function gtag_report_conversion(url) {
  var callback = function () {
    if (typeof(url) != 'undefined') {
      window.location = url;
    }
  };
  gtag('event', 'conversion', {
      'send_to': 'AW-706973679/rYQfCIzkn6wBEO-fjtEC',
      'event_callback': callback
  });
  return false;
}
</script>
<script src="https://yastatic.net/pcode/adfox/loader.js" crossorigin="anonymous"></script>
<script data-ad-client="ca-pub-6943655653791297" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

  
  </head>


<?php
    //sub Menu Home page
    $menu = JFactory::getApplication()->getMenu();
    if (is_object( $menu->getActive() ) ) {
        $getMenu_route = $menu->getActive()->route;
        $subMenu_home = strpos($getMenu_route,'home/');
    }else{
        $subMenu_home ='';
    }


    //render a class for home page
    $cls_body = '';
    $cls_body .= $yt->isHomePage() || is_numeric($subMenu_home) ? 'homepage ' : '';

    //Add Layout
    $cls_body .= 'home-'.$layout. ' ';

    //For RTL direction
    $cls_body .= ($doc->direction == 'rtl') ? 'rtl' . ' ' : '';

    //add a class according to the template name
    $cls_body .= ($layoutType !='res') ? 'no-res'.'':'res';

    $type_layout = 'layout-'.$yt->getParam('typelayout');
    
    $app = JFactory::getApplication('site');
    $pageclass =  $app->getParams('com_content');
?>
<body id="bd" class="<?php echo $cls_body; ?>" >
    <jdoc:include type="modules" name="debug" />
    <?php if($preloader): ?>
        <div class="loader-content">
            <div class="cssload-loader">
                <div class="cssload-inner cssload-one"></div>
                <div class="cssload-inner cssload-two"></div>
                <div class="cssload-inner cssload-three"></div>
            </div>
       </div>
   <?php endif;?>
    <div id="yt_wrapper" class="<?php echo $type_layout; ?>">

        <?php
        /*render blocks. for positions of blocks, please refer layouts folder. */
        foreach($yt_render->arr_TB as $tagBD) {
            //BEGIN Check if position not empty
            if( $tagBD["countModules"] > 0 ) {

                // BEGIN: Content Area
                if( ($tagBD["name"] == 'content') ) {
                    //class for content area
                    $cls_content  = $tagBD['class_content'];
                    
                    $cls_content .= ' '.$pageclass->get('pageclass_sfx');
                    $cls_content  .= ' block '. $option ;
                    echo "<{$tagBD['html5tag']} id=\"{$tagBD['id']}\" class=\"{$cls_content}\">";
                    ?>

                        <div  class="container">
                            <div  class="row">
                                <?php
                                $countL = $countR = $countM = 0;
                                // BEGIN: foreach position of block content
                                $yt->_countPosGroup($tagBD['positions']);
                                foreach($tagBD['positions'] as $position):
                                    include(J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'block-content.php');
                                endforeach;
                                // END: foreach position of block content
                                ?>
                            </div >
                        </div >

                    <?php
                    echo "</{$tagBD['html5tag']}>";
                    ?>
                    <?php
                // END: Content Area

                // BEGIN: For other blocks
                } elseif ($tagBD["name"] != 'content'){
                    echo "<{$tagBD['html5tag']} id=\"{$tagBD['id']}\" class=\"block\">";
                    ?>
                        <div class="container">
                            <div class="row">
                            <?php
                            if( !empty($tagBD["hasGroup"]) && $tagBD["hasGroup"] == "1"){
                                // BEGIN: For Group attribute
                                $flag = '';
                                $openG = 0;
                                $c = 0;
                                foreach( $tagBD['positions'] as $posFG ):
                                    $c = $c + 1;
                               .......
</body>
</html>
Ответить с цитированием