Изменить локализацию main menu

Тема в разделе "Изменение шаблона (кастомизация)", создана пользователем happyzi, 11.03.2013.

  1. Offline

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

    Регистрация:
    11.03.2013
    Сообщения:
    1
    Симпатии:
    0
    Пол:
    Женский
    Здравствуйте.
    Появилась необходимость поменять локализацию main menu шаблона (изначально он прописан как блок в шаблоне, без позиции(это как я поняла))
    На картинке:
    Необходимо поставить MM на место ТОР меню(т.е. в позицию ТОР 3) А место где ММ сделать позицией ТОР 3. Поменять их местами проще говоря)
    Как это возможно сделать?? U7Y8ESly.jpg

    Возможно вознаграждение)) Не за спасибо))
    файл индекс:
    Код (CODE):
    1. <?php
    2. // no direct access
    3. defined( '_JEXEC' ) or die( 'Restricted access' );
    4. if(J_VERSION=='3'){
    5.     define('J_TEMPLATEDIR', __DIR__);
    6. }elseif(J_VERSION=='2'){
    7.     define('J_TEMPLATEDIR', dirname(__FILE__));
    8. }
    9. // Include class YtTemplate
    10. include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'yt_template.class.php');
    11. // Include file: frame_inc.php
    12. include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'frame_inc.php');
    13. // Check RTL or LTF direction
    14. $dir = ($ytrtl == 'rtl')? ' dir="rtl"' : '';
    15. ?>
    16. <!DOCTYPE html>
    17. <html<?php echo $dir; ?> lang="<?php echo $this->language; ?>">
    18. <head>
    19.     <jdoc:include type="head" />
    20.     <?php
    21.     $browser = new Browser();
    22.     ?>
    23.     <meta name="HandheldFriendly" content="true"/>
    24.     <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />  
    25.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    26.     <?php if ($browser->getBrowser()== Browser::BROWSER_IPHONE ){?>
    27.         <meta name="apple-mobile-web-app-capable" content="yes" />
    28.         <meta name="apple-touch-fullscreen" content="yes" />
    29.     <?php }
    30.     include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'head.php');
    31.     ?>
    32. </head>
    33. <?php
    34.     //
    35.     $cls_body = '';
    36.     //render a class for home page
    37.     $cls_body .= $yt->isHomePage()? 'homepage ' : '';
    38.     //add a class for each component
    39.     $cls_body .= (JRequest::getVar('option')!= null)? JRequest::getVar('option').' ' : '';
    40.     //add a view class which helps you easy to style
    41.     $cls_body .= (JRequest::getVar('view')!= null)? 'view-' . JRequest::getVar('view'). ' ' : '';
    42.     //for stype. With each style, we will use one class
    43.     $cls_body .= $yt->getParam('sitestyle').' ';
    44.     //for RTL direction
    45.     $cls_body .= ($ytrtl == 'rtl')? 'rtl' . ' ' : '';
    46.     //add a class according to the template name
    47.     $cls_body .= $yt->template. ' ';
    48.     // class no-slideshow
    49.     $cls_body .=  ($doc->countModules('slide_show'))?'':'no-slideshow ';
    50.     // class ipadbrowser
    51.     $cls_body .=  ($browser->getBrowser()== Browser::PLATFORM_IPAD )?' ipadbrowser':'';
    52. ?>
    53. <body id="bd" class="<?php echo $cls_body; ?>" onLoad="prettyPrint()">   
    54.     <jdoc:include type="modules" name="debug" />                                  
    55.     <section id="yt_wrapper">  
    56.         <a id="top" name="scroll-to-top"></a>
    57.         <?php
    58.         /*render blocks. for positions of blocks, please refer layouts folder. */
    59.         foreach($yt_render->arr_TB as $tagBD) {
    60.             //BEGIN Check if position not empty
    61.             if( $tagBD["countModules"] > 0 ) {
    62.                 // BEGIN: Content Area
    63.                 if( ($tagBD["name"] == 'content') ) {
    64.                     //class for content area
    65.                     $cls_content  = $tagBD['class_content'];
    66.                     $cls_content  .= ' block';
    67.                     echo "<{$tagBD['html5tag']} id=\"{$tagBD['id']}\" class=\"{$cls_content}\">";
    68.                     ?>
    69.                         <div class="yt-main">
    70.                             <div class="yt-main-in1 container">
    71.                                 <div class="yt-main-in2 row-fluid">
    72.                                     <?php
    73.                                     $countL = $countR = $countM = 0;
    74.                                     // BEGIN: foreach position of block content
    75.                                     // IMPORTANT: Please do not edit this block
    76.                                     foreach($tagBD['positions'] as $position):
    77.                                         include(J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'block-content.php');
    78.                                     endforeach;
    79.                                     // END: foreach position of block content
    80.                                     ?>
    81.                                 </div>
    82.                             </div>
    83.                         </div>        
    84.                     <?php  
    85.                     echo "</{$tagBD['html5tag']}>";
    86.                     ?>
    87.                     <?php
    88.                 // END: Content Area
    89.                 // BEGIN: For other blocks
    90.                 } elseif ($tagBD["name"] != 'content'){    
    91.                     echo "<{$tagBD['html5tag']} id=\"{$tagBD['id']}\" class=\"block\">";
    92.                     ?>
    93.                         <div class="yt-main">
    94.                             <div class="yt-main-in1 container">
    95.                                 <div class="yt-main-in2 row-fluid">
    96.                                 <?php      
    97.                                 if( !empty($tagBD["hasGroup"]) && $tagBD["hasGroup"] == "1"){
    98.                                     // BEGIN: For Group attribute
    99.                                     $flag = '';
    100.                                     $openG = 0;
    101.                                     $c = 0;
    102.                                     foreach( $tagBD['positions'] as $posFG ):  
    103.                                         $c = $c + 1;
    104.                                         if( $posFG['group'] != "" && $posFG['group'] != $flag){
    105.                                             $flag = $posFG['group'];
    106.                                             if ($openG == 0) {
    107.                                                 $openG = 1;
    108.                                                 $groupnormal = 'group-' . $flag.$tagBD['class_groupnormal'];
    109.                                                 echo '<div class="' . $groupnormal . ' ' . $yt_render->arr_GI[$posFG['group']]['class'] . '">' ;
    110.                                                 echo $yt->renPositionsGroup($posFG);   
    111.                                                 if($c == count( $tagBD['positions']) ) {
    112.                                                     echo '</div>';
    113.                                                 }
    114.                                             } else {
    115.                                                 $openG = 0;
    116.                                                 $groupnormal = 'group-' . $flag;                                       
    117.                                                 echo '</div>';
    118.                                                 echo '<div class="' . $groupnormal . ' '. $yt_render->arr_GI[$posFG['group']]['class'] . '">' ;                                
    119.                                                 echo $yt->renPositionsGroup($posFG);
    120.                                             }
    121.                                         } elseif ($posFG['group'] != "" && $posFG['group'] == $flag){
    122.                                             echo $yt->renPositionsGroup($posFG);
    123.                                             if($c == count( $tagBD['positions']) ) {
    124.                                                 echo '</div>';
    125.                                             }
    126.                                         }elseif($posFG['group']==""){
    127.                                             if($openG ==1){
    128.                                                 $openG = 0;
    129.                                                 echo '</div>';
    130.                                             }
    131.                                             echo $yt->renPositionsGroup($posFG);
    132.                                         }
    133.                                     endforeach;
    134.                                     // END: For Group attribute
    135.                                 }else{
    136.                                     // BEGIN: for Tags without group attribute
    137.                                     if(isset($tagBD['positions'])){
    138.                                         echo $yt->renPositionsNormal($tagBD['positions'], $tagBD["countModules"]);
    139.                                     }
    140.                                     // END: for Tags without group attribute
    141.                                 }
    142.                                 ?>
    143.                                 </div>
    144.                             </div>
    145.                         </div>
    146.                     <?php
    147.                     echo "</{$tagBD['html5tag']}>";
    148.                     ?>
    149.             <?php
    150.                }
    151.                // END: For other blocks
    152.             }
    153.             // END Check if position not empty
    154.         }
    155.         //END: For
    156.         ?>
    157.         <?php
    158.         include_once (J_TEMPLATEDIR.J_SEPARATOR.'includes'.J_SEPARATOR.'bottom.php');
    159.         ?>
    160.     </section>
    161. </body>
    162. </html>
     
  2.  

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

Загрузка...