IMPORTANT MESSAGE REGARDING CODE BLOCKS IN THE FORUM

The use of formatted code blocks has been restored in our (Kunena powered) forum for old and new threads.

Any code should (again) be placed within [code]...[/code] tags in the message editor.

Keyword

Hide extra field in category view list

More
1 month 1 week 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
1 month 1 week ago #180005 by Fotis
Replied by Fotis 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.
Attachments:

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

More
1 month 1 week 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.


Powered by Kunena Forum