Keyword

latest K2 extra fields additions?

  • Johnnie Kazija
  • Johnnie Kazija's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago #106971 by Johnnie Kazija
latest K2 extra fields additions? was created by Johnnie Kazija
I can not find a way to get these new extrafields system to work?
is there any tutorial that could show us how to create this what is described in the latest release?

2 new extra field types have been added" image & header. The "image" type uses the K2 media modal which you can use to select existing images or upload new ones by drag and drop. The "header" type is basically a "cosmetic" extra field. You can add "header" extra fields so you can group the field presented in the K2 item edit form (both in the backend and when frontend editing is enabled). This way, long forms with many extra fields are now easier to manage for content editors. There is also the option to display these "header" extra fields in the frontend, in case you also want to add meaningful headers to the extra field data you present on your site. So imagine for example a car database website that lists additional info for a car model: you can use the "header" extra field to add h4 html headers and therefore separate/mark/group info like "engine", "body", "tyres", "accessories" etc. It's a small addition, but it can be very helpful to have.

can we see this somewhere in action?
thank you

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

More
11 years 10 months ago #106972 by william white
Replied by william white on topic Re: latest K2 extra fields additions?
Create a new xtra field "header" type and look at it in the back end of the item. Change the order around to get it to serve as a title for a subgroup of extra fields

create an new img type extra field and place an image in it
edit in an override item.php and put just under where it displays title
<?php echo $this->item->extraFields->EXTRAFIELDALIASHERE->value ;?>
you should see the image beside the title

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

  • Johnnie Kazija
  • Johnnie Kazija's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago #106973 by Johnnie Kazija
Replied by Johnnie Kazija on topic Re: latest K2 extra fields additions?
I dont see the possibility to create a subgroup of extra fields ?

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

More
11 years 10 months ago #106974 by william white
Replied by william white on topic Re: latest K2 extra fields additions?
ist not really a subgroup, just a header that you can seperate the fields with

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

  • Johnnie Kazija
  • Johnnie Kazija's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago #106975 by Johnnie Kazija
Replied by Johnnie Kazija on topic Re: latest K2 extra fields additions?
but there is some code digging still required?
<?php echo $this->item->extraFields->EXTRAFIELDALIASHERE->value ;?>
???

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

More
11 years 10 months ago #106976 by william white
Replied by william white on topic Re: latest K2 extra fields additions?
you only have to add code if you want to display the extra fields in a different format or place than they normally appear

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

  • Johnnie Kazija
  • Johnnie Kazija's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 10 months ago #106977 by Johnnie Kazija
Replied by Johnnie Kazija on topic Re: latest K2 extra fields additions?
can get this done :sick:
cant find any area in the item php where it mentions img or header?

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

More
11 years 10 months ago #106978 by william white
Replied by william white on topic Re: latest K2 extra fields additions?
In the default item.php they are not included. You only need to change it and add code if you want it displayed somewhere other than the default extra fields are shown.
The header extra field types are only to segregate extra fields when you are adding a new item if you like.

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

More
11 years 6 days ago #106979 by cork
Replied by cork on topic Re: latest K2 extra fields additions?
Does anyone know how to add new extra fields to the Extra Fields? I want to add a date range picker.

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


Powered by Kunena Forum