K2 category list of items

Responsive community-minded music Joomla template with JomSocial extension support.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Dec 30, 2013 2:58 pm
Reply with quote
Report this post
Hi I have two problems with item from this category view http://swiatloczula.nazwa.pl/new/index.php/o-nas/tworcy

1) When I make the window smaller responsive pictures are getting too small and I still have 3 columns layout grid. I would like to have only one/two columns on mobile the same way it's done in joomla category blog layout:
http://swiatloczula.nazwa.pl/new/index.php/o-nas/nasza-ekipa-menu

2) I need to define image of the item as a "dominant part" of the row, instead of the title. So when the title has more then one line ten it goes upper and does't put the picture below (you can find it on second half of the category at "KATARZYNA SOBAŃSKA I MARCEL SŁAWIŃSKI" item)
User avatar
Senior Boarder

teitbite
Tue Dec 31, 2013 3:59 am
Reply with quote
Report this post
Hi

1. Please add this to mobile.css:

Code: Select all
.itemContainer {
    float: none;
    width: 100% !important;
}


2. I do not understand what You mean. Can You please explain it a little better ?
User avatar
Moderator

GK User
Tue Dec 31, 2013 11:50 am
Reply with quote
Report this post
Hi,
I'm sorry for not being clear. I'll try to explain myself better

1) I add this and it works fine but what if one day I install some template updates? Won't this rule disappear? Shouldn't I put it inside of override.css?

2) I would like to have items in 3 columns, where each row has a picture on the same line/hight.
Now only text keeps the same line, so when it's too long (2 lines) it puts the image lower like on the picture:
User avatar
Senior Boarder

teitbite
Tue Dec 31, 2013 7:31 pm
Reply with quote
Report this post
Hi

1. Some changes are harder to separate, but sure move it to override.css, but make it looks like this than:

Code: Select all
@media only screen and (max-width:HERE-GOES-WIDTH-OF-IPHONE-LAYOUT-SPECIFIED-IN-TEMPLATE-SETTINGSpx) {
.itemContainer {
    float: none;
    width: 100% !important;
}
}


2. Add this to css to make all titles wait for 2 lines:

Code: Select all
article header.nodate {
    min-height: 75px;
}
User avatar
Moderator

GK User
Tue Dec 31, 2013 7:53 pm
Reply with quote
Report this post
1) it's solved- thank you a lot!
2) Is this the only way? Now one line titles has too big margin from the photo. If there is no simple way of changing css I will have to separate them as to different items to keep titles shorter...
User avatar
Senior Boarder

teitbite
Thu Jan 02, 2014 6:10 pm
Reply with quote
Report this post
Hi

1. Great

2. I'm afraid so. The only other solution I may think of is to do the oposite and not lock title to 2 lines but restrict to 1 only by cutting the rest of the text with this code:

Code: Select all
article header.nodate {
    max-height: 45px;
    overflow: hidden;
}
User avatar
Moderator

GK User
Fri Jan 03, 2014 12:38 pm
Reply with quote
Report this post
Close, but now the picture goes over the title. Well I will just separate them. Thank you anyway!
User avatar
Senior Boarder

teitbite
Sun Jan 05, 2014 4:08 am
Reply with quote
Report this post
Hi

They should not go over images with overflow:hidden. maybe it needs a small adjustment:

Code: Select all
article header.nodate {
    max-height: 45px;
    overflow: hidden !important;
    display: block;
}
User avatar
Moderator

GK User
Thu Jan 16, 2014 3:09 pm
Reply with quote
Report this post
Hi,

Hi, I just moved the title - under the picture.

In components/com_k2/templates/default/category_item.php

Find and cut:

<?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
<!-- Item Image -->
<div class="catItemImageBlock">
<span class="catItemImage">
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</a>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>


next paste it beteween (about line 24 in my case):

<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $this->item->event->K2BeforeDisplay; ?>


-----> HERE!


<div class="catItemHeader">
<?php if($this->item->params->get('catItemDateCreated')): ?>
<!-- Date created -->



For me works just fine ;)
User avatar
Expert Boarder

teitbite
Sat Jan 18, 2014 4:26 am
Reply with quote
Report this post
Hi

Thank You for shearing solution with us :)
User avatar
Moderator


cron