-
AuthorPosts
-
June 5, 2017 at 10:29 pm #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
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
June 6, 2017 at 7:23 am #1039885Hi,
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.
June 6, 2017 at 2:13 pm #1040007Your 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
June 7, 2017 at 2:07 am #1040163Hi Nino,
Kindly follow that topic, our moderators will help you out.
Cheers!
AuthorPostsViewing 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
change position to the extrafieds in the items list
Viewing 4 posts - 1 through 4 (of 4 total)