Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Добавить ссылки в category.tpl


Ketty83
 Share

Recommended Posts

Помоги пожалуйста разобраться с меню... Пытаюсь добавить свои ссылки в category.tpl со стилями от категорий.. но нифика не могу))) блондинке не хватает ума, можно так сказать)))

<p class="h2"><?php echo $heading_title; ?></p>
<div class="list-group">    
  <a href="/novinki/" class="list-group-item active">Новинки</a> 
  <?php foreach ($categories as $category) { ?>
  <?php if ($category['category_id'] == $category_id) { ?>
  <a href="<?php echo $category['href']; ?>" class="list-group-item<?php if ($child_id==0) { ?> active<?php } ?>"><?php echo $category['name']; ?></a>
  <?php if ($category['children']) { ?>
  <?php foreach ($category['children'] as $child) { ?>
  <?php if ($child['category_id'] == $child_id) { ?>
  <a href="<?php echo $child['href']; ?>" class="list-group-item active">&nbsp;&nbsp;&nbsp;- <?php echo $child['name']; ?></a>
  <?php } else { ?>
  <a href="<?php echo $child['href']; ?>" class="list-group-item">&nbsp;&nbsp;&nbsp;- <?php echo $child['name']; ?></a>
  <?php } ?>
  <?php } ?>
  <?php } ?>
  <?php } else { ?>   
  <a href="<?php echo $category['href']; ?>" class="list-group-item"><?php echo $category['name']; ?></a>
  <?php } ?>
  <?php } ?> 
  <a href="/specials/" class="list-group-item active">Распродажа</a> 
</div>


ссылка <a href="/novinki/" class="list-group-item active">Новинки</a>  при таком написаннии постоянно активна... как сделать чтоб стили активной ссылки были только при переходе на страницу?? 
За ранее спасибо за помощь!

Link to comment
Share on other sites


:unsure: так то не очень правильно писать, что то поменялось не в тополь же снова лезть, в контроллере бы надо черкнуть строчку да в админ части

Link to comment
Share on other sites

1 час назад, theRGD сказал:

:unsure: так то не очень правильно писать, что то поменялось не в тополь же снова лезть, в контроллере бы надо черкнуть строчку да в админ части

 

ну до контроллера и админ части мне далеко))) пока разобралась только так :huh:

Link to comment
Share on other sites


2 часа назад, theRGD сказал:

:unsure: надо учить

оооо)) блондинкам трудно это дается))) тем более когда не знаешь что и как))

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.