Keyword

Adding custom extra fields

  • Gobezu Sewu
  • Gobezu Sewu's Avatar Topic Author
  • Offline
  • Senior Member
More
14 years 3 months ago #78724 by Gobezu Sewu
Adding custom extra fields was created by Gobezu Sewu
Have anyone here made a custom extra field in addition to those already providedI have tried to figure out and see how this intrinsic feature of a cck is handled and well my verdict is, not as extensible done as flexicontent,resources etc., but I must say it seems (...yet to dig into it) manageable and employing json as central mechanism of encoding the values is neat, and besides the de-normalized approach taken by jw is bound to give it quite a boost in terms of performance as no need of joining to various other field value container tables is required which also necessitates extra queries to be fired.Anyway as far as I have figured it out the steps needed to be taken are:
extra field addition is handled entirely with js (mootools) and is all to be handled in the k2 administrator view of extrafields (administrator/components/com_k2/views/extrafield)
once you have constructed your ui you would need to be able to provide for the other functionalities such as make it searchable, editable, saveable and is handled by K2ModelExtraField (administrator/components/com_k2/models/extrafield.php)
and then you have the last piece which is rendering the field value which is handled within K2ModelItem (components/com_k2/models/item.php)

So before me going on and knocking myself out and breaking my k2v2.2 code, does anyone have any further suggestion, specially if fotis could confirm I am on the right track and need to also make sure of this and that, or maybe advice on how I can make this in some extensible manner w/o breaking my k2/2.2, or even advice on what's in the upcoming release (I have indeed seen a tweet that something was in the making).Thanks!

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


Powered by Kunena Forum