Keyword

extra field variables called from item editor?

  • Morten Højer
  • Morten Højer's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago #105116 by Morten Højer
extra field variables called from item editor? was created by Morten Højer
Hi there, does anyone know the variable for calling a certain extra fields variable so that it can be used in the items standard k2 editor?

Thanks in advance!

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

More
12 years 1 month ago #105117 by william white
Replied by william white on topic Re: extra field variables called from item editor?
calling $this->item->extrafields is used inside a foreach loop in item.php or category_item.php
php statements are not normally allowed inside the editor unless you use a plugin that searches its content, runs the php code, and delivers the output back to the total output

Search here for address or calling extra fields and you will find examples of displaying them in a custom format

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

  • Morten Højer
  • Morten Højer's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago - 12 years 1 month ago #105118 by Morten Højer
Replied by Morten Højer on topic Re: extra field variables called from item editor?
Hi William, thanks for your reply!

Im wondering if it can really be true that it's not possible in any way to change how your item is presented, without having to fiddle with code that, to be honest, i started to use joomla to prevent entirely.

To me being able to decide how all the items information is displayed on the site is an absolutely fundamental feature, but in K2 i seem to be limited to "Extra fields - hide/show"...

I guess if you're building a newssite it maybe not be that big a deal, but if you're building a site for yacht sales company, an item is likely to have 20-40 extra fields with vital information.

I would expect this to be something a lot of people have come across before me using k2. For instance sites that present car sales or real estates, must of course have more options than "hide/show".

It may be me who have too high expectations for k2 in general. Is k2 the wrong solution for me doing these kinds of sites, and should i instead look for a completely different kind of extension for these?

Thanks in advance for your time!

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

More
12 years 1 month ago #105119 by william white
Replied by william white on topic Re: extra field variables called from item editor?

Im wondering if it can really be true that it's not possible in any way to change how your item is presented, without having to fiddle with code that, to be honest, i started to use joomla to prevent entirely.

There are many paramaters in both the item and category view that will "change" the way the item is presented.
The k2 templates or overrides control the order in which they are presented, and you can move that around, insert tabs, and other things by working with the appropriate blocks of code in item.php and category_item.php You also have the text field where you can do just as any normal j article

To me being able to decide how all the items information is displayed on the site is an absolutely fundamental feature, but in K2 i seem to be limited to "Extra fields - hide/show"...

The default behavior is for all the fields to show along with the field names, and if there empty they dont display. You can hide all of them. Many times you will need to use the overrides to display extra fields in a custom place. this requires php

A good example of cars with k2 is at joomcar.net/k2ef-demo using a custom module with k2

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


Powered by Kunena Forum