Can`t show related item`s pictures in K2
Rate this topic: 1.00 out of 6 based on 1 vote(s)
- GK User
- Tue Dec 23, 2014 3:03 pm
- Reply with quote
- Report this post
I am using your News 2 template with Joomla 3 and K2 2.6.9. Everything is working great, but I can`t show pictures in related items in K2. Could you help me with this?
-
- Expert Boarder
- teitbite
- Wed Dec 24, 2014 9:58 am
- Reply with quote
- Report this post
Hi
Please tell me the url to the example of a page You want to show related items on.
Please tell me the url to the example of a page You want to show related items on.
-
- Moderator
- GK User
- Thu Dec 25, 2014 4:49 pm
- Reply with quote
- Report this post
Look here under the article: http://www.zdravduh.com/index.php/2011- ... ela-koleda
-
- Expert Boarder
- teitbite
- Sun Dec 28, 2014 10:52 am
- Reply with quote
- Report this post
hi
Please edit /html/com_k2/templates/default/item.php find a related elements code (around line 265) and add this for image:
Please edit /html/com_k2/templates/default/item.php find a related elements code (around line 265) and add this for image:
- Code: Select all
<?php if($this->item->params->get('itemRelatedImageSize')): ?>
<img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php K2HelperUtilities::cleanHtml($item->title); ?>" />
<?php endif; ?>
-
- Moderator
- GK User
- Mon Dec 29, 2014 2:38 pm
- Reply with quote
- Report this post
Hi, this code is already there. Meybe it is about settings. But I don`t know what exactly. Could you please help me with that.
-
- Expert Boarder
- teitbite
- Tue Dec 30, 2014 1:02 pm
- Reply with quote
- Report this post
Hi
The only way condition will not show is if "itemRelatedImageSize" is not configured, so You may try and find where this can be set. Unfortunatelly I do not know K2 as well to know where this option is.
You may also try replacing the code with:
so no condition will be used and image will be displayed.
The only way condition will not show is if "itemRelatedImageSize" is not configured, so You may try and find where this can be set. Unfortunatelly I do not know K2 as well to know where this option is.
You may also try replacing the code with:
- Code: Select all
<img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php K2HelperUtilities::cleanHtml($item->title); ?>" />
so no condition will be used and image will be displayed.
-
- Moderator
- GK User
- Mon Jan 05, 2015 1:29 pm
- Reply with quote
- Report this post
I tried to replace the code with the second one with no condition and still nothing happens. I checked all the possible setting in K2 - nothing again. I even copied everything from your quickstart site ( where the pictures show) and still no success.
-
- Expert Boarder
- teitbite
- Tue Jan 06, 2015 1:13 pm
- Reply with quote
- Report this post
Hi
Mystery solved I've made a dump and looks like images are not showing because You do not have images for articles. All images are set in content and related items are looking for a main image uploaded with a separated tag in K2 add article page.
Mystery solved I've made a dump and looks like images are not showing because You do not have images for articles. All images are set in content and related items are looking for a main image uploaded with a separated tag in K2 add article page.
-
- Moderator
- GK User
- Tue Jan 06, 2015 2:58 pm
- Reply with quote
- Report this post
Thank you, but I am afraid I don`t understand how to fix this.
-
- Expert Boarder
- teitbite
- Wed Jan 07, 2015 9:04 pm
- Reply with quote
- Report this post
Hi
The only way to have images in related articles section is to move the first image from content to K2 image section.
PS: You can write a script capable of extraxting first image from content and displaying it instead, but it's an additional functionality, so I cannot help with this, sorry.
The only way to have images in related articles section is to move the first image from content to K2 image section.
PS: You can write a script capable of extraxting first image from content and displaying it instead, but it's an additional functionality, so I cannot help with this, sorry.
-
- Moderator
- GK User
- Thu Jan 08, 2015 1:59 pm
- Reply with quote
- Report this post
Thank you so much. My problem is that I don`t know how to move an image to K2 image section. How have you achieved this in your quickstart website?
-
- Expert Boarder
- GK User
- Thu Jan 08, 2015 2:10 pm
- Reply with quote
- Report this post
Sorry for the stupid question, I finally saw how to do this - from image tab in K2 editor. If I do this for 500 articles it will be a lot of work. Maybe I should wait for such plugin compatible with joomla 3.
Thank you so much! Close this topic, please.
Thank you so much! Close this topic, please.
-
- Expert Boarder
- teitbite
- Fri Jan 09, 2015 10:07 pm
- Reply with quote
- Report this post
Hi
If it's 500 articles than I would leave it like it is now and starting to use K2 images. With time You will have all related articles filled with images.
If it's 500 articles than I would leave it like it is now and starting to use K2 images. With time You will have all related articles filled with images.
-
- Moderator
- GK User
- Sat Jan 10, 2015 5:44 pm
- Reply with quote
- Report this post
OK, thank you. And is there a way to use one of your modules and put it under my K2 articles to show categories with pictures for example?
-
- Expert Boarder
- teitbite
- Sun Jan 11, 2015 9:29 pm
- Reply with quote
- Report this post
Hi
Sorry, but none of our modules is capable of showing a category picture. You need to look for a different module for that.
Sorry, but none of our modules is capable of showing a category picture. You need to look for a different module for that.
-
- Moderator
- GK User
- Tue Jan 13, 2015 4:23 pm
- Reply with quote
- Report this post
Hi, I just want to note that dispite I put image in the image section to be the main image of the article, it still does not appear in the related items pictures. There might be another problem then.
-
- Expert Boarder
- GK User
- Wed Jan 14, 2015 3:14 pm
- Reply with quote
- Report this post
I am thinking that here some code for the img is missing: <?php foreach($this->relatedItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<?php if($this->item->params->get('itemRelatedTitle', 1)): ?>
<a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a
<?php endif; ?>
I see only code for the link to title, but not for the image.
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<?php if($this->item->params->get('itemRelatedTitle', 1)): ?>
<a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a
<?php endif; ?>
I see only code for the link to title, but not for the image.
-
- Expert Boarder
- teitbite
- Fri Jan 16, 2015 4:23 pm
- Reply with quote
- Report this post
Hi
Looks like it's still the same issue. I've made a dump of the related article and still there is nothing assigned to "image" value. Please send me an access to joomla panel, so I'll check settings for this articles.
Looks like it's still the same issue. I've made a dump of the related article and still there is nothing assigned to "image" value. Please send me an access to joomla panel, so I'll check settings for this articles.
-
- Moderator
- teitbite
- Sun Jan 18, 2015 4:20 pm
- Reply with quote
- Report this post
Hi
Finally A size of the related image was not selected i category settings. I've selected "medium" and now the image is there.
Finally A size of the related image was not selected i category settings. I've selected "medium" and now the image is there.
-
- Moderator
- GK User
- Mon Jan 19, 2015 8:54 am
- Reply with quote
- Report this post
Thank you so much! You are the best
-
- Expert Boarder
- GK User
- Mon Jan 19, 2015 2:50 pm
- Reply with quote
- Report this post
I want to ask you something. I noticed something strange when I logged in and open the last K2 Item. The buttons of the editor (Tyny MCE) were misssing and all the articles are swithed to source code. Did you change something or the problem is in me?
-
- Expert Boarder
- GK User
- Mon Jan 19, 2015 3:49 pm
- Reply with quote
- Report this post
Ok, I guess the problem is in me. I turned off all the other editors and it appeared again. Sorry to bother you
-
- Expert Boarder
- GK User
- Tue Jan 20, 2015 8:54 am
- Reply with quote
- Report this post
Hi, me again. Sorry I am really confused. Where have you found in categories this option for medium size of related item`s by tag? I found it in the main category that other categories inherit (лични финанси) , but when I change it there, nothing happens at the front end. And I can`t find such an option in K2 general options.
-
- Expert Boarder
- teitbite
- Wed Jan 21, 2015 8:50 pm
- Reply with quote
- Report this post
Hi
You have 2 categories with the same name: "Лични финанси". I have changed it in the one with ID 143
You have 2 categories with the same name: "Лични финанси". I have changed it in the one with ID 143
-
- Moderator
- GK User
- Thu Jan 22, 2015 10:03 am
- Reply with quote
- Report this post
O, I feel stupid You are the best, really
-
- Expert Boarder
- teitbite
- Sat Jan 24, 2015 12:42 pm
- Reply with quote
- Report this post
Hi
I may know this things now, but trust me I had no idea how to deal with this things some time ago. Anyway, that's really great we got this thing sorted out
I may know this things now, but trust me I had no idea how to deal with this things some time ago. Anyway, that's really great we got this thing sorted out
-
- Moderator
- GK User
- Sat Jan 24, 2015 5:07 pm
- Reply with quote
- Report this post
It`s good you found a way to deal with this things with this little angel at your shoulders. I have one myself - the same age. Thank you for your help
-
- Expert Boarder
- teitbite
- Mon Jan 26, 2015 9:26 pm
- Reply with quote
- Report this post
Hi
That's an old photo This one has 7 years already. But the new model is about his size, just needs much more attentions the first one needed ;/
That's an old photo This one has 7 years already. But the new model is about his size, just needs much more attentions the first one needed ;/
-
- Moderator
30 posts
• Page 1 of 1