Keyword

Extending K2 with plugins - params vs fields

  • Lefteris
  • Lefteris's Avatar Topic Author
  • Offline
  • Moderator
More
12 years 1 month ago - 12 years 1 month ago #102695 by Lefteris
I took a look at example k2 plugin that I found on this site.
I saw that in xml file J1.5 standard <params> are used instead of J2.5 <fields> with clear comment on that:

...These parameters are parsed by K2 only and we decided to just make things easier for developers, instead of opting for double parameters in 'params' and 'fields' blocks.

I just wanted to check if that means that K2 plugin parameters are limited to J1.5 standard parameters?

The thing is that I need some sort of multiselect option (checkboxes, multiselect dropdown...) inside custom plugin and J1.5 standard parameters don't have this option

Is this going to change in 3.x series of K2?

J2.5 standard field types offer really wider set of different field types.

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

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

More
12 years 1 month ago #102696 by esedic
Lefteris, any comment on that?

Sorry for bumping.

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

  • Lefteris
  • Lefteris's Avatar Topic Author
  • Offline
  • Moderator
More
12 years 1 month ago #102697 by Lefteris
Hi. You can still define custom elements and make a param what exactly you want. For example using in your XML:
addpath="/plugins/k2/yourplugin/elements"

will add this path to the parameters path. Then in this folder you can define whatever parameter you like. You can see several example of custom elements under the directory /administrator/components/com_k2/elements

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

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 8 months ago - 11 years 8 months ago #102698 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: Extending K2 with plugins - params vs fields
Sorry for pubmbing, but I want to know where to add this code in the XML file:
addpath="/plugins/k2/yourplugin/elements"

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.


Powered by Kunena Forum