Keyword

Hide extra field in category view list

More
7 months 3 weeks ago #179999 by imim
Hello everyone, as per the subject, I need to hide some additional fields from the category list.

Have a look at the page: www.ilmondoinmano.eu/strutture/zante.
Here I need to hide the last two additional fields, named "Destinazione" and "Servizi".

I found a workaround on the web which consists in using the CSS pseudo-classes in k2.css by inserting a string like: 
div.itemExtraFields ul li:nth-child(-n+3) { display:none; } 

but this only works in the item view and not in category list.
Can you help me? Thanks

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

More
7 months 3 weeks ago #180005 by JoomlaWorks
Replied by JoomlaWorks on topic Hide extra field in category view list
You can use the "alias..." class that is generated for each item in the category view. This is the code reference: github.com/getk2/k2/blob/master/components/com_k2/templates/default/category_item.php#L139

See an example from your site attached.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Attachments:

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

More
7 months 2 weeks ago #180013 by imim
Replied by imim on topic Hide extra field in category view list
Fotis, thanks for your quick reply. I have to figure out exactly where to intervene since I am very familiar with html and css, but not very familiar with php. How should I edit category_item.php? Thanks again for your help

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

More
6 months 2 days ago #180101 by JoomlaWorks
Replied by JoomlaWorks on topic Hide extra field in category view list

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum