Keyword

Extra Fields data in a table column

  • Justin Place
  • Justin Place's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 3 months ago - 11 years 3 months ago #114963 by Justin Place
Extra Fields data in a table column was created by Justin Place
Hi,

I have set up my html table properly on my category page here:
www.borderlearning.justrite.co.za/index.php/component/k2/itemlist/category/9-bnb?limitstart=0

by adding the table element to my category.php custom template
<?php if((isset($this->leading) || isset($this->primary) || isset($this->secondary) || isset($this->links)) && (count($this->leading) || count($this->primary) || count($this->secondary) || count($this->links))): ?>
        <!-- Item list -->
<table align="center">
<tr>
  <td>Listing</td>
  <td>Contact Number</td>
  <td>Further Details</td>
</tr>
<tr>
<td>
        <div class="itemList">

However i still have two extra fields that i want data to display in.. -> Contact Number & Further details.

i know you have to add this code:
<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<?php if(isset($this->item->extraFields->contactnumber->value)): ?>
     <?php echo $this->item->extraFields->furtherdetails->value; ?>   
<?php endif; ?>
<?php endif; ?>

but im not sure where to add it.

Please Log in or Create an account to join the conversation.

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 3 months ago #114964 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Extra Fields data in a table column
Hi,

I think this is a category listing page, therefore it should be added in the category_item.php file.

If it is latest items page, then add it to the latest_item.php file.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

Please Log in or Create an account to join the conversation.

  • Justin Place
  • Justin Place's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 3 months ago #114965 by Justin Place
Replied by Justin Place on topic Re: Extra Fields data in a table column
Hi there,

i have tried to insert the code in the category_item.php file but it does not seem to call the data into the column of my table:(

Any suggestions would be greatly appreciated.

Please Log in or Create an account to join the conversation.

  • Justin Place
  • Justin Place's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 3 months ago #114966 by Justin Place
Replied by Justin Place on topic Re: Extra Fields data in a table column
Hi there,

I am just wondering if an admin would kindly check my problem please.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum