Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • iorfino Friend
    #1039705

    Hello is it possible change the position of the k2 extrafields in the category items list? I’d like to move them from the orange rectangle/slide to the white box between the article name and the category name. See also the attach

    http://ninoiorfino.it/catalogo/eventi

    Nino


    1. list-item
    Saguaros Moderator
    #1039885

    Hi,

    You can customize it via K2 category item layout file: [root]/templates/ja_directory/html/com_k2/directory/category_item.php

    REMEMBER to backup this file first (just in case)

    Look for the snippet of code which renders the extrafields:

    <?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
    <!-- Item extra fields -->
    <div class="catItemExtraFields">
    <h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
    <ul>
    <?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
    <?php if($extraField->value != ''): ?>
    <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
        <?php if($extraField->type == 'header'): ?>
        <h4 class="catItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
        <?php elseif(($extraField->alias != 'latitude') && ($extraField->alias != 'longitude') ): ?>
        <span class="catItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
        <span class="catItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
        <?php endif; ?>
    </li>
    <?php endif; ?>
    <?php endforeach; ?>
    </ul>
    <div class="clr"></div>
    </div>
    <?php endif; ?>

    and paste it underneath the Title of K2 item like this: http://prntscr.com/fgfqx5

    Hope this helps.

    iorfino Friend
    #1040007

    Your script is very helpful!

    I wait for a new assistance to other my topic
    id-number-instead-of-location-name-2/

    thank you

    Nino

    Saguaros Moderator
    #1040163

    Hi Nino,

    Kindly follow that topic, our moderators will help you out.

    Cheers!

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Saguaros 7 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum