Keyword

Certain extra fields

  • Saulius
  • Saulius's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #96350 by Saulius
Certain extra fields was created by Saulius
Hi, everyone at K2 community.

 

So, although it hasn't been long since I started using K2 for my Joomla based websites I'm already feeling pretty confident with this wonderful component! However, there is one thing that I can't figure out how to achieve, and that is showing only certain extra fields in item view in category listings. I have like 15 extra fields for each item but I would like only 5 or 6 that are most important to be shown while in item view in category listings, and all the rest when in item view. I understand that it's all about editing a certain code, but I can't figure out which one...:| Is it even possible? And if yes, can anyone show me how? :)

 

Looking forward to you replies!

 

Regards

Saulius
Attachments:
The topic has been locked.
  • Saulius
  • Saulius's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #96351 by Saulius
Replied by Saulius on topic Certain extra fields
...anyone?
The topic has been locked.
More
13 years 4 months ago #96352 by william white
Replied by william white on topic Certain extra fields
You will probably need to create an override and edit category_item.php

In that file you will find a block of code that lists the extra fields

It is controlled by a foreach loop.

You can add a test for the field names you want inside that loop or

You can comment the loop out and use one of the other methods of putting the extra fields into an array and displaying a list of them.

There are several good threads in this forum about extra fields - a common topic...example

a quick reference ishere

You can also look into Sherpa from jiliko.net which is a k2 extension
The topic has been locked.
  • Saulius
  • Saulius's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #96353 by Saulius
Replied by Saulius on topic Certain extra fields
Well, William, I must admit that I don't fully understand how to achieve this effect. Probably because I lack the understanding of how it really works and I believe I can't really do it without an exact example. Maybe I'm asking too much, but here's what I'm working on www.autogrupe.lt/autonuoma/ Don't mind the Lithuanian language there. I just want only first five of these extra fields to be shown in this category item view. Can you be more accurate about this particular case? I attach my category_item.php I would be also willing to give you access to my admin panel in case you need it. I would be very thankful if you explained more about this particular case. It seem that I can only learn from an actual expert ;)

 

Looking forward to your reply!
The topic has been locked.
More
13 years 4 months ago #96354 by william white
Replied by william white on topic Certain extra fields
If you are not in a rush I can help with this, but at the moment im very tied up at work. Please send me a friend request and pm me

Maybe someone else who has the same need will jump in and  test the php code as well
The topic has been locked.
  • Saulius
  • Saulius's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 4 months ago #96355 by Saulius
Replied by Saulius on topic Certain extra fields
Thanks, William! I sent you a friend request. Hope to get in touch with you soon!
The topic has been locked.
More
13 years 4 months ago #96356 by Rebecca Christiana
Replied by Rebecca Christiana on topic Certain extra fields
Hello William, could you help me with this too?

I need to show certains extrafields in item category view and all extra fields in item view.

Thank you very much.

 

Rebecca

William White said:
If you are not in a rush I can help with this, but at the moment im very tied up at work. Please send me a friend request and pm me

Maybe someone else who has the same need will jump in and  test the php code as well
The topic has been locked.
More
13 years 4 months ago #96357 by william white
Replied by william white on topic Certain extra fields
please see friend request and pm me
The topic has been locked.

Powered by Kunena Forum