Keyword

customize the display of items k2 of certain categories

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155673 by Alaabouch
Hello,

Is it possible to customize the display of items k2 of certain categories. for example, (title of item + extra field) ?

like this exemple : see atachment

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155733 by Krikor Boghossian
Replied by Krikor Boghossian on topic customize the display of items k2 of certain categories
First of all you should use overrides -> getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

In the category_item.php file you can perform a simple check like this:
<?php if($item->categoryname == 'CATEGORY_NAME'): 
#code here
endif; ?>

Where you can echo some CSS class which differentiate the layout.

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

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

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155754 by Alaabouch
Hi,

thank you for attention, I've followed the instructions cited in this connection and is the result :

www.aidepharmacien.ma/allergologie/antihistaminiques-h1

but what I do not understand is that I did call that 4 additional fields! why others are displayed ?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155760 by Krikor Boghossian
Replied by Krikor Boghossian on topic customize the display of items k2 of certain categories
These are the extrafields. You can hide them by selecting 'Hide' in the category's settings.

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

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

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago - 8 years 3 months ago #155767 by Alaabouch
Hi

You can hide them by selecting 'Hide' in the category's settings.

I made it but this is the result :



the option hides all the additional fields :(

I think we have something that deleted the file category_item.php !
Last edit: 8 years 3 months ago by Alaabouch.

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

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago - 8 years 3 months ago #155772 by Alaabouch
Hi,

Here I was able to do it, but I know not how to go to the same line as the title !

Last edit: 8 years 3 months ago by Alaabouch.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155810 by Krikor Boghossian
Replied by Krikor Boghossian on topic customize the display of items k2 of certain categories
You should move the extrafields block next to the title and apply float left to these classes.

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

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

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155829 by Alaabouch
Hi,

can you give me a hand please. I remove the extra fields to the title but I know not how to apply float right to te class ?

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

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155856 by Alaabouch
Hi,

Here, I just do it! but it's ugly as design. is it possible to integrate them in a table ?

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

  • Alaabouch
  • Alaabouch's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 3 months ago #155857 by Alaabouch
Hi,

Here, I just do it! but it's ugly as design. is it possible to integrate them in a table ?

www.aidepharmacien.ma/antalgiques/antalgiques-non-opioides

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


Powered by Kunena Forum