Keyword

Extra field in module

  • Stefano Messina
  • Stefano Messina's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #58988 by Stefano Messina
Extra field in module was created by Stefano Messina
Hi, I need to show data from a single extra field in a module (this one extensions.joomla.org/extensions/extension-specific/k2-extensions/17120) , I tried some php codes I found (even in the old K2 forum) but it seems that "outside K2" (article, category etc) it doesn't work...

I'm not good at PHP, can someone show me how is it done?

Thanks in advance

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

  • Stefano Messina
  • Stefano Messina's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #58989 by Stefano Messina
Replied by Stefano Messina on topic Re: Extra field in module
Please, it's for work and I have no idea how to solve this :(

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

More
12 years 10 months ago #58990 by william white
Replied by william white on topic Re: Extra field in module
Have you tried asking here skyoftech.com/forum/8-module-sot-k2-tab-slider.html
This looks like a free extension and there are other paid extensions there as well. In one of the threads there someone is asking to display extra info and got a response from the dev

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

  • Stefano Messina
  • Stefano Messina's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #58991 by Stefano Messina
Replied by Stefano Messina on topic Re: Extra field in module
Thanks for the reply. Unfortunately I've not found what I wanted there (but I'll try asking myself and see if someone has a solution).

Btw, my question is more general, as I'll probably need (in future) to reuse extra fields in other places besides K2 articles/categories. So It's fine either a code for this module or a more generic one.

I red that It's possible to make a direct query at the database, retrieving the data needed, but I know next to nothing about SQL...

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

More
12 years 10 months ago #58992 by william white
Replied by william white on topic Re: Extra field in module
Here is one way of doing "compliments of Alan" on the old k2 forum
williamwhitejr.com/index.php?option=com_k2&view=item&id=119:accessing-extra-fields
this is placed in a k2 template or override, the code for a module would be similar, but the hard part will be letting the module know what the item is doing and getting the field from the right items record

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

  • Stefano Messina
  • Stefano Messina's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #58993 by Stefano Messina
Replied by Stefano Messina on topic Re: Extra field in module
Thank you.

Unfortunately it doesn't work, or at least i cannot get it to work: it outputs nothing.

I've inserted all the code in default.php which is the standard view for the module, but somehow it seems that extra fields are "available" to use only in a "K2 environment" (article item view, category view, etc), in fact inside an article it works perfectly.

Thank you again, I've had no luck with this until now.

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

More
12 years 4 months ago #58994 by Frode
Replied by Frode on topic Re: Extra field in module
Did you get an answer?

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


Powered by Kunena Forum