- Posts: 36
COMMUNITY FORUM
Single Extra Field Display in Tag listing
- Andrew Paterson
- Topic Author
- Offline
- Junior Member
Less
More
9 years 1 month ago #147482
by Andrew Paterson
Single Extra Field Display in Tag listing was created by Andrew Paterson
I would like to customise the position of various extra fields in a tag listing, by echoing them in tag.php.
I have tried:
and
These methods are working fine in K2 category listsings, and K2 content module respectively. The extra fields display fine when using the standard code in tag.php:
Is it possible to achieve this?
I have tried:
<?php echo $this->extraFields->IntroText->value ?>
and
<?php echo $this->item->extraFields->IntroText->value ?>
These methods are working fine in K2 category listsings, and K2 content module respectively. The extra fields display fine when using the standard code in tag.php:
<?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="tagItemExtraFields">
<h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
<ul>
<?php foreach ($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="tagItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="tagItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
<span class="tagItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
Is it possible to achieve this?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 1 month ago #147485
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Single Extra Field Display in Tag listing
In the tag.php $item is used instead of $this->item
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Andrew Paterson
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
9 years 1 month ago #147486
by Andrew Paterson
Replied by Andrew Paterson on topic Single Extra Field Display in Tag listing
Works great thank you.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 1 month ago #147497
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Single Extra Field Display in Tag listing
You 're welcome Andrew :)
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.