Keyword

horizontally Related items

  • נט צפת
  • נט צפת's Avatar Topic Author
  • Offline
  • New Member
More
10 years 10 months ago #121169 by נט צפת
horizontally Related items was created by נט צפת
Hello
I want the item's Related products appear horizontally

Can anyone refer me to a suitable module

Or guide me how I do this in CSS?

tiltan-flowers.co.il/index.php/2012-07-26-12-34-38

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121170 by Yiota
Replied by Yiota on topic Re: horizontally Related items
There is this reference in the item.php file

/*
Note regarding 'Related Items'!
If you add:
- the CSS rule 'overflow-x:scroll;' in the element div.itemRelated {…} in the k2.css
- the class 'k2Scroller' to the ul element below
- the classes 'k2ScrollerElement' and 'k2EqualHeights' to the li element inside the foreach loop below
- the style attribute 'style="width:<?php echo $item->imageWidth; ?>px;"' to the li element inside the foreach loop below
...then your Related Items will be transformed into a vertical-scrolling block, inside which, all items have the same height (equal column heights). This can be very useful if you want to show your related articles or products with title/author/category/image etc., which would take a significant amount of space in the classic list-style display.
*/

First of all you need to create K2 template overrides in order to modify this file. Read here how to setup your overrides getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Then just add the changes mentioned to this reference and you will have the related items block horizontally.

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


Powered by Kunena Forum