Keyword

Remove Item Image

More
4 years 4 months ago #175571 by T M
Remove Item Image was created by T M
I am experiencing issues with my template using T3 framework.

The item view setting doesn't disable the image in the K2 item. I need it to display in the category but not the item view.

How can I edit the css files to remove this?

I tried changing: .carousel-inner > .item > a > img{display:block;max-width:100%;height:auto} and changed it to:

.carousel-inner > .item > a > img{display:none;max-width:100%;height:auto}. Which works, but it also takes the image out of category view.

Any help would be appreciated. There has to be a way to eliminate the header from the item view only.

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

More
4 years 4 months ago - 4 years 4 months ago #175572 by T M
Replied by T M on topic Remove Item Image
Found a solution

- getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Created a new templete.

Then went into the html file of the new template and deleted the following:

<!-- item image -->
<?php if ($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
<div class="item-image">
<!-- Item Image -->
<span class="">
<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 class="img-responsive" 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; ?>
<!-- item image -->

The settings within the category and item work now.
Last edit: 4 years 4 months ago by T M.

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

More
4 years 4 months ago #175587 by JoomlaWorks
Replied by JoomlaWorks on topic Remove Item Image
That's the HTML output, not CSS. In any case, I doubt you need to do that. Images can be disabled from the K2 settings. If they didn't apply as intended, it's probably due to some misconfiguration.

Fotis / 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