COMMUNITY FORUM
latest K2 extra fields additions?
- Johnnie Kazija
- Topic Author
- Offline
- Senior Member
is there any tutorial that could show us how to create this what is described in the latest release?
can we see this somewhere in action?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.
thank you
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
- Posts: 3722
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
- Topic Author
- Offline
- Senior Member
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- Johnnie Kazija
- Topic Author
- Offline
- Senior Member
<?php echo $this->item->extraFields->EXTRAFIELDALIASHERE->value ;?>
???
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- Johnnie Kazija
- Topic Author
- Offline
- Senior Member
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.
- william white
- Offline
- Platinum Member
- Posts: 3722
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.
- cork
- Offline
- Junior Member
- Posts: 25
Please Log in or Create an account to join the conversation.