Открыть позицию для всех страниц сайта

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

  1. Zlusya
    Offline

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

    Регистрация:
    08.10.2014
    Сообщения:
    7
    Симпатии:
    1
    Пол:
    Женский
    Здравствуйте, вопрос таков: есть шаблон на главной странице которого отображается позиция left, но для других страниц данного сайта, этой позиции нет. Да, в привязках пункта меню стоит "на всех страницах", позиция закрыта в одном файле, и помоему я его нашла, но в php абсолютный ноль. Подскажите пожалуйста как снять ограничение.
    код где,как я предпологаю, ограничен вывод позиции
    Код (PHP):
    1. // no direct access
    2. $option = JRequest::getVar('option', null);
    3. $view = JRequest::getVar('view', null);
    4. $route = JRequest::getVar('route', null);
    5. //$layout = JRequest::getVar('layout', null);
    6. $task = JRequest::getVar('task', null);
    7. //var_dump($task);
    8.  
    9. defined( '_JEXEC' ) or die( 'Restricted access' );
    10. if ($position['group'] == '') { // Position none group
    11.    echo $yt->renPositionsContentNoGroup($position);
    12.  
    13. } elseif ( ($position['group'] != 'left') && ($position['group'] != 'main') && ($position['group'] != 'right') ) {    // Position has group's user created
    14.    if (!isset($countGSpe)) {
    15.      $countGSpe = 0;
    16.    }
    17.    $countGSpe ++;
    18.  
    19.    if($countGSpe == 1) {
    20.      echo '<div id="' . $position['group'] . '" ' . ($style != '' ? 'style="'.$style.'"' : '') .'>';
    21.      echo $yt->renPositionsGroup($position);
    22.      $width = $height = $style = "";
    23.      if($tagBD['count-'.$position['group']] == 1) {
    24.        $countGSpe = null;
    25.        echo '</div>';
    26.      }
    27.    } elseif ( $countGSpe == $tagBD['count-'.$position['group']] && $tagBD['count-'.$position['group']] > 1 ) {
    28.      echo $yt->renPositionsGroup($position);
    29.      $countGSpe = null;
    30.      echo '</div>';
    31.    } else {
    32.      echo $yt->renPositionsGroup($position);
    33.  
    34.    }
    35. } elseif ( ($position['group'] == 'left')
    36.     ||($position['group'] == 'main')
    37.     ||($position['group'] == 'right') ) { // Position has group's framework fixed   - left, main, right
    38.  
    39.    if($position['group'] == 'left') {
    40.      $countL ++;
    41.  
    42.      if($countL == 1) {
    43.  
    44.        $more_attr = '';
    45.        $more_attr .= (isset($yt_render->arr_GI['left']['data-wide']))?' data-wide="'.$yt_render->arr_GI['left']['data-wide'].'"':'';
    46.        $more_attr .= (isset($yt_render->arr_GI['left']['data-normal']))?' data-normal="'.$yt_render->arr_GI['left']['data-normal'].'"':'';
    47.        $more_attr .= (isset($yt_render->arr_GI['left']['data-tablet']))?' data-tablet="'.$yt_render->arr_GI['left']['data-tablet'].'"':'';
    48.        $more_attr .= (isset($yt_render->arr_GI['left']['data-stablet']))?' data-stablet="'.$yt_render->arr_GI['left']['data-stablet'].'"':'';
    49.        $more_attr .= (isset($yt_render->arr_GI['left']['data-mobile']))?' data-mobile="'.$yt_render->arr_GI['left']['data-mobile'].'"':'';
    50.  
    51.        if( ($this->countModules('left') ) && !($option=='com_jshopping'  && $task=='view') )  {
    52.          echo '<aside id="content_left" class="'.$yt_render->arr_GI['left']['class'].'"'.$more_attr.'>';
    53.          echo $yt->renPositionsGroup($position, 'block-content');
    54.          if($tagBD['count-group-left'] == 1) {
    55.            echo '</aside>';
    56.          }
    57.        }
    58.  
    59.      } elseif ($tagBD['count-group-left'] == $countL && $tagBD['count-group-left'] > 1) {
    60.        echo $yt->renPositionsGroup($position, 'block-content');
    61.        echo '</div></div>';
    62.      } else {
    63.        echo $yt->renPositionsGroup($position, 'block-content');
    64.      }
    65.    } elseif ($position['group'] == 'main') {
    66.      $countM++;
    67.      if ($countM == 1) {
    68.        $more_attr = '';
    69.        $more_attr .= (isset($yt_render->arr_GI['main']['data-wide']))?' data-wide="'.$yt_render->arr_GI['main']['data-wide'].'"':'';
    70.        $more_attr .= (isset($yt_render->arr_GI['main']['data-normal']))?' data-normal="'.$yt_render->arr_GI['main']['data-normal'].'"':'';
    71.        $more_attr .= (isset($yt_render->arr_GI['main']['data-tablet']))?' data-tablet="'.$yt_render->arr_GI['main']['data-tablet'].'"':'';
    72.        $more_attr .= (isset($yt_render->arr_GI['main']['data-stablet']))?' data-stablet="'.$yt_render->arr_GI['main']['data-stablet'].'"':'';
    73.        $more_attr .= (isset($yt_render->arr_GI['main']['data-mobile']))?' data-mobile="'.$yt_render->arr_GI['main']['data-mobile'].'"':'';
    74.        if(  !($option=='com_jshopping'  && $task=='view') )  {
    75.          echo '<div id="content_main" class="'.$yt_render->arr_GI['main']['class'].'" '.$more_attr.'>' ;
    76.          echo $yt->renPositionsGroup($position, 'main');
    77.          if($tagBD['count-group-main'] == 1 ) {
    78.            echo '   </div>';
    79.            echo '</div>';
    80.          }
    81.        }else{
    82.          echo '<div id="content_main" class="col-sm-12 nobanner">' ;
    83.          echo $yt->renPositionsGroup($position, 'main');
    84.          if($tagBD['count-group-main'] == 1 ) {
    85.            echo '   </div>';
    86.            echo '</div>';
    87.          }
    88.        }
    89.      } elseif ( ($tagBD['count-group-main'] == $countM) && ($tagBD['count-group-main'] > 1) ){
    90.        echo $yt->renPositionsGroup($position, 'main');
    91.        echo '</div>';
    92.      } else {
    93.        echo $yt->renPositionsGroup($position, 'main');
    94.      }
    95.    } elseif ($position['group'] == 'right') {
    96.      $countR ++;
    97.      if($countR == 1) {
    98.        $more_attr = '';
    99.        $more_attr .= (isset($yt_render->arr_GI['right']['data-wide']))?' data-wide="'.$yt_render->arr_GI['right']['data-wide'].'"':'';
    100.        $more_attr .= (isset($yt_render->arr_GI['right']['data-normal']))?' data-normal="'.$yt_render->arr_GI['right']['data-normal'].'"':'';
    101.        $more_attr .= (isset($yt_render->arr_GI['right']['data-tablet']))?' data-tablet="'.$yt_render->arr_GI['right']['data-tablet'].'"':'';
    102.        $more_attr .= (isset($yt_render->arr_GI['right']['data-stablet']))?' data-stablet="'.$yt_render->arr_GI['right']['data-stablet'].'"':'';
    103.        $more_attr .= (isset($yt_render->arr_GI['right']['data-mobile']))?' data-mobile="'.$yt_render->arr_GI['right']['data-mobile'].'"':'';
    104.  
    105.        if( !($option=='com_jshopping'  && $task=='view'))  {
    106.          echo '<aside id="content_right" class="'.$yt_render->arr_GI['right']['class'].'"'.$more_attr.'>';
    107.          echo $yt->renPositionsGroup($position, 'block-content');
    108.          if($tagBD['count-group-right'] == 1) {
    109.            echo '</aside>';
    110.          }
    111.        }
    112.      } elseif ($countR == $tagBD['count-group-right'] && $tagBD['count-group-right'] > 1) {
    113.        echo $yt->renPositionsGroup($position, 'block-content');
    114.        echo '</div></div>';
    115.      } else {
    116.        echo $yt->renPositionsGroup($position, 'block-content');
    117.      }
    118.    }
    119. }
    120. ?>
     
  2.  
  3. Лучший ответ:
    Сообщение #2 от 06.04.2015, автор OlegK
  4. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    Лучший ответ
    Я вижу только запрет на показ модуля в позиции left, при прсмотре компонента jshopping
    Код (PHP):
    1. if( ($this->countModules('left') ) && !($option=='com_jshopping' && $task=='view') ) {
    2.  
    3. echo '<aside id="content_left" class="'.$yt_render->arr_GI['left']['class'].'"'.$more_attr.'>';
    4.  
    5. echo $yt->renPositionsGroup($position, 'block-content');
    6.  
    7. if($tagBD['count-group-left'] == 1) {
    8.  
    9. echo '</aside>';
    10.  
    11. }
    12.  
    13. }

    Пробуй так
    Код (PHP):
    1. if( ($this->countModules('left') )) {
    2.  
    3. echo '<aside id="content_left" class="'.$yt_render->arr_GI['left']['class'].'"'.$more_attr.'>';
    4.  
    5. echo $yt->renPositionsGroup($position, 'block-content');
    6.  
    7. if($tagBD['count-group-left'] == 1) {
    8.  
    9. echo '</aside>';
    10.  
    11. }
    12.  
    13. }
     
    Zlusya нравится это.
  5. Zlusya
    Offline

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

    Регистрация:
    08.10.2014
    Сообщения:
    7
    Симпатии:
    1
    Пол:
    Женский
    Спасибо, помогло!) С меня пирожок и печенька в сл раз)
     

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

Загрузка...