Проблема Как добавить дополнительный класс?

Discussion in 'Модернизация расширений' started by SergeyKorut, Apr 13, 2015.

  1. Offline

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

    Joined:
    Apr 13, 2015
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    Добрый день помогите пожалуйста.

    Есть вот такой кусок кода:

    Код (PHP):
    1. // List all Images
    2.                 if (count($this->product->images) > 0) {
    3.                 foreach ($this->product->images as $image) {
    4.                 echo  $image->displayMediaFull( 'class="medium-image" id="medium-image"', true,  'class="item"',  true, true) ;
    5.                 }
    6.                 }


    Как сделать так чтобы только к первому элементу сюда 'class="item"' добавлялся класс active?

    Заранее благодарю за помощь.
     
  2.  

Share This Page

Loading...