Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Djs page

  • Michele Traverso
  • Michele Traverso's Avatar Topic Author
  • Offline
  • New Member
More
10 years 4 months ago #138987 by Michele Traverso
Djs page was created by Michele Traverso
Hi,
there is a bug in your theme:
in the djs page there are some photos, but if I open the page of a dj, his image is posted 4 times (demo.nuevvo.com/#radiowave/index.php?option=com_k2&view=item&id=36:john-doe&Itemid=133)
Is possible to use two different images? Or maybe use a larger image that will be zoomed in the djs page?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 4 months ago #138988 by Krikor Boghossian
Replied by Krikor Boghossian on topic Djs page
This is not a bug, the image is repeated.

If you do not want the image to repeat itself you have to use this snippet in your custom.css file.
.itemGridView .itemImageBlock span.itemImage span { background-repeat: no-repeat; background-size: cover; height: 550px; }
.fullWidth .itemImageBlock { max-height: 550px; }

PS. You can change the 550px to a height that matches your images.

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

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

  • Michele Traverso
  • Michele Traverso's Avatar Topic Author
  • Offline
  • New Member
More
10 years 4 months ago #138989 by Michele Traverso
Replied by Michele Traverso on topic Djs page
Thank you very much, but it isn't very beautiful, so is possible to have 2 different images? One for the djs page and one fot the page of a dj?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 4 months ago #138990 by Krikor Boghossian
Replied by Krikor Boghossian on topic Djs page
That is a tricky question.
By default no. K2 does not have a seperate image in listings and items. However if you have some basic coding skills you can achieve this.

What you need to do is:
a) Create a new image-type extrafield for the DJ's (Producer Additional Info group)
b) Read this post on how to render specific extrafields.
getk2.org/community/English-K2-Community/171284-Where-to-edit-K2-after-Item-Fields

c) Backup and open the item.php file located in templates/radiowave/html/com_k2/grid .

Now: replace the following block of code:
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
            <?php /* <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;" /> */?>
            <span style="background-image:url(<?php echo $this->item->image; ?>);"></span>  
          </a>

With the code for the extrafield. Some CSS tweaking might be needed. Furthermore you can also replace the if statements for the image with ones that correspond with the extrafield.

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

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


Powered by Kunena Forum