- Posts: 17
COMMUNITY FORUM
[SOLVED] Main image only appears as pop up
- Andy
-
Topic Author
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- P
-
- Offline
- New Member
- Posts: 12
I ask you because i have this problem and i don't want to open new topic.
I use Joomla 3.2.2, K2 2.6.8 and Bedava template. I do tests in xampp.
If anyone knows let give specific, clear instructions because i am new in Joomla.
I can make changes in files if someone tell me where and what to do.
Thank you and sorry for my english.
Please Log in or Create an account to join the conversation.
- Andy
-
Topic Author
- Offline
- New Member
- Posts: 17
Please Log in or Create an account to join the conversation.
- P
-
- Offline
- New Member
- Posts: 12
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Hi. It seems that both of you are using a template which causes this. Usually templates using Bootstrap conflict with the default modal implementation of Joomla!. Try to create override for the item.php ( or edit the existing one ) and just remove the class "modal" from the image link. This should fix your issue.
Please Log in or Create an account to join the conversation.
- P
-
- Offline
- New Member
- Posts: 12
I am not very familiar to make these changes, i am new in all this...so i need a bit more analytic
instructions about how to:
1) create override for the item.php (or edit the existing one)
2) remove the class "modal" from the image link
Sorry but i am amateur in this.
Thank you.
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
1. getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates . Note that your template might be already using overrides. In that case you just need to edit them.
2. In item.php, line 209, remove the following part:
class="modal"
Please Log in or Create an account to join the conversation.
- Andy
-
Topic Author
- Offline
- New Member
- Posts: 17
/templates/YOURTEMPLATE/html/com_k2/default/item.php
Please Log in or Create an account to join the conversation.
- P
-
- Offline
- New Member
- Posts: 12
do i copy all the contents of folder /components/com_k2/templates/ to folder
templates/YOURTEMPLATE/html/com_k2/ or only the file item.php;
2nd question
In file item.php, from this code:
<span class="itemImage">
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>"
title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
<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>
i only remove the class="modal" ;
Please Log in or Create an account to join the conversation.
- Andy
-
Topic Author
- Offline
- New Member
- Posts: 17
from the item.php. Worked a treat for me.
Please Log in or Create an account to join the conversation.
- P
-
- Offline
- New Member
- Posts: 12
Thank you both of you...i have copied all the contents of folder /components/com_k2/templates/ . Is this wrong;
Is too much if i ask now how we can left or right align image with text wrapped;
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
If you copied all the contents of folder then K2 will use these files from your template and the main files at /components/com_k2/templates/ will get ignored. It is up to you, if you want to customize all files or not. Regarding your second question, this is a pure CSS question. You can use CSS to float the image left or right. But since you are not familiar with CSS i suggest that you ask your template provider for this. Most templates have built in classes for that.
Please Log in or Create an account to join the conversation.
- P
-
- Offline
- New Member
- Posts: 12
Your help was valuable
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.