Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Saguaros Moderator
    #980786

    Hi Nino,

    Could you update the URL of site you’re working on and provide the login info so I will have a look?

    iorfino Friend
    #980839

    Hi Saguaros,
    Sure. I have updated the prev message.

    Saguaros Moderator
    #980917

    Hi,

    You will need to customise the K2 item view page a little bit. Try with my tweak here:

    • Go to file: ROOT/templates/ja_directory/html/com_k2/directory/item.php
    • Look for this snippet of code which renders the extra fields:

      <div class="itemExtraFields">
      <ul>
      <?php $latitude = ""; $longitude = ""; ?>
      <?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') && ($extraField->alias != 'latitude') && ($extraField->alias != 'longitude') ): ?>
              <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
              <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
          <?php endif; ?>
      
          <?php if($extraField->alias == 'latitude') $latitude = $extraField->value; ?> 
          <?php if($extraField->alias == 'longitude') $longitude = $extraField->value; ?> 
      </li>
      <?php endif; ?>
      <?php endforeach; ?>
      </ul>
      <div class="clr"></div>
      </div>
      <?php endif; ?>
      </div>
    • Add above code underneath this line of code:
      <aside class="col t3-sidebar directory-aside col-sm-4 col-md-3">

    It looks like this: http://prntscr.com/czjoul

    And, of course, you will need to style for it as you wish.

    iorfino Friend
    #981027

    Hi,
    perfect solution for extrafields position! Now I have the layout I need it.
    Thanks a lot.

    Nino

    Saguaros Moderator
    #981202

    You’re welcome!!!

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

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

The topic ‘extrafields in sidebar-2 position ?’ is closed to new replies.