- Posts: 3
COMMUNITY FORUM
Hide extra field in category view list
- imim
- Topic Author
- Offline
- New Member
Less
More
2 years 7 months ago #179999
by imim
Hide extra field in category view list was created 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:
but this only works in the item view and not in category list.
Can you help me? Thanks
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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
2 years 7 months ago #180005
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
See an example from your site attached.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- imim
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
2 years 7 months 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.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
2 years 5 months ago #180101
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Hide extra field in category view list
Follow this guide to override K2 files: getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.