Keyword

K2 Call specific ExtraField in category_item.php

  • Max Lang
  • Max Lang's Avatar Topic Author
  • Offline
  • New Member
More
7 years 10 months ago #158928 by Max Lang
Hello,

iam trying to call some Specific ExtraFields to show in my Category_item.php

First of all i create an array:
<?php
						$extraFld = array();
						if ($item->extra_fields) 
							{
								$extraFields = json_decode($item->extra_fields, false);
								foreach ($extraFields as $key=>$extraField)
								{
									$extraFld[ $extraField->id ] = $extraField->value;
								}
							}
					?>

than i try to call out one specific position. to show right after my Title with:
<?php echo $extraFld[4]; ?>

for exaple

Title of Category
<extrafield>
Author of Category
..


it does not work... in tag.php everything works just fine.
And yes i have activated ExtraField in category options.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 10 months ago #158931 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Call specific ExtraField in category_item.php

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Max Lang
  • Max Lang's Avatar Topic Author
  • Offline
  • New Member
More
7 years 10 months ago #159152 by Max Lang
can u help me please? i dontknow how i need to set this code to get any result.

take for exaple the alias of one extrafield like PLZ and help me with the code please

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 10 months ago #159158 by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Call specific ExtraField in category_item.php
What is the code you used?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum