Keyword

Display an extraField in a module

More
7 years 6 months ago #160871 by Joe Campbell
Replied by Joe Campbell on topic Display an extraField in a module
I would,greatly appreciate if someone provided the code for the entire file.

Please test first — thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #160875 by Krikor Boghossian
Replied by Krikor Boghossian on topic Display an extraField in a module
Why not use K2 Content and only display the extrafields?

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

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

More
7 years 6 months ago #160879 by Joe Campbell
Replied by Joe Campbell on topic Display an extraField in a module
My goal is to render an extra field from the current item into a module.

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
7 years 6 months ago - 7 years 6 months ago #160887 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Display an extraField in a module
Hi All,

I think the K2 BNR Content module can be used for this purpose.

Either by using template overrides for the module, i.e to create a separate template override for each extra field you want to show, you need to replace the section of extra fields display of the module to show only one extra field by alias, then to select that template override in the proper module instance.

Or, by hacking the module to add a text field parameter to enter the field alias you want to show with this module instance.
This is a quick tutorial on how to display K2 extra field of the current item in a module position using BNR Content for K2

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Last edit: 7 years 6 months ago by Mohamed Abdelaziz. Reason: Added reference of the tutorial

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

More
7 years 6 months ago #160914 by Lefteris
Replied by Lefteris on topic Display an extraField in a module
@Joe Campbell

Can you please clarify what exactly do you mean by "the current item"?

K2 content module cannot fetch the data of the current item page if this is what you mean.

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

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

More
7 years 6 months ago - 7 years 6 months ago #160915 by Joe Campbell
Replied by Joe Campbell on topic Display an extraField in a module
Thanks @Lefteris

I wonder how/why @Nazmal is saying he can do it...
www.joomlaworks.net/forum/k2-en/47520-display-an-extrafield-in-a-module?limitstart=0#160860

It would be ideal if the K2 Content Module could do it
Last edit: 7 years 6 months ago by Joe Campbell.

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

More
7 years 6 months ago #160916 by Lefteris
Replied by Lefteris on topic Display an extraField in a module
@Joe Campbell

This is about displaying a specific extra field of the items fetched by the K2 content module (depending on the module settings) .

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

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

More
7 years 6 months ago #160917 by Joe Campbell
Replied by Joe Campbell on topic Display an extraField in a module
Can the K2 Content Module fetch the extra field JSON for the current page?

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

More
7 years 6 months ago #160918 by Joe Campbell
Replied by Joe Campbell on topic Display an extraField in a module
Now that I heard from @Lefteris that it can not be accomplished with the core K2 Content Module, I installed BNR Content for K2 and created an override — it works like a charm.

Note: if you not need apply conditions and just want to display extra fields of the current item, you can always uses the trusty Regular Labs Articles Anywhere extension with following code. Simply change the extra field ID:

{article k2:current}{extra-198}{/article}

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 6 months ago #160961 by Krikor Boghossian
Replied by Krikor Boghossian on topic Display an extraField in a module
Kudos buddy :)

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