Keyword

chang place gallery into bottom picture item

More
10 years 7 months ago #124674 by mahdi
Hi
I want to make some changes in k2 Gallery was located just below the main image content ...
Help please(This email address is being protected from spambots. You need JavaScript enabled to view it.)

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 7 months ago #124675 by Yiota
First you will have to create a K2 template override (read here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates how they work) then you will have to modify item.php file, locate this code
 <?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?>
  <!-- Item image gallery -->
  <a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a>
  <div class="itemImageGallery">
	  <h3><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h3>
	  <?php echo $this->item->gallery; ?>
  </div>
  <?php endif; ?>
[code]

and move it right under this code

[code]
<?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
	  <!-- Item Image -->
	  <div class="itemImageBlock">
		  <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>

		  <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
		  <!-- Image caption -->
		  <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
		  <?php endif; ?>

		  <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
		  <!-- Image credits -->
		  <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
		  <?php endif; ?>

		  <div class="clr"></div>
	  </div>
	  <?php endif; ?>

Note: If your template already has a com_k2 folder located in your template folder under html folder ignore the part where you create a K2 template override.

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

More
10 years 7 months ago #124676 by mahdi
I've changed the file, but no change was observed.
plz help.
paste the your code into item.php.
see:
azarsan.ir/test/index.php/blog/categories/item/27-etiam-porttitor-turpis-sit-amet-mauris-volutpat-eu-ullamcorper-libero-below-for-those-pulvinar
==========
gallery Were still down

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 7 months ago #124677 by Yiota
Make sure that your template folder doesn't already include template overrides (templates/your_template/html/com_k2/.....) and if it does make sure that the modification is done there and not elsewhere.

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

More
10 years 7 months ago #124678 by mahdi
Sorry it did not work again.
If you give the password is correct THIS IS????

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 7 months ago #124679 by Yiota
You need to make sure that you are making the modification to the correct file.
Add a test message in the one you are trying to make the change and see if you get it in the page you have provided.

Add this test message right under <div id="k2Container" ....>

<?php echo 'this is the correct file'; ?>

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


Powered by Kunena Forum