Keyword

Simple image gallery in intro text

More
10 years 8 months ago #123381 by zymo
Hello,

I am using the simple image gallery in my articles, and when looking at an category the gallery is displayed beneath the intro text to the articles. How can I change this?

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123382 by Yiota
Replied by Yiota on topic Re: Simple image gallery in intro text
Hello,

What you need to do is to create overrides of the k2 template files if you don't use already. Read here getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates how the overrides work.

Then you will have to edit the item.php file of your overrides and locate this block of 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; ?>

This is the block that shows the gallery. You can move it wherever you want your gallery to appear.

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

More
10 years 8 months ago #123383 by zymo
Replied by zymo on topic Re: Simple image gallery in intro text
The options to not show the gallery in K2 are just for the PRO version of the simple image gallery? And is there a simpler way not to show the gallery, like the option to strip the html in the intro text, is it possible to somehow manually add the option to strip the {gallery} from the intro text?


Thank you for the answers.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123384 by Yiota
Replied by Yiota on topic Re: Simple image gallery in intro text
Yes, I'm sorry, I didn't realise you were referring to a gallery used inside the introtext. I thought you were using the gallery from the Image Gallery tab. So to answer your questions one by one

The options for the gallery are indeed for the Pro version of SIG,

To strip it from your intro text you can put it in the fulltext, put a limit in the introtext, enable the "Introtext HTML cleanup (tag strip)" from the K2 Configuration under the Content tab and choose which elements you don't want to strip.

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

More
10 years 8 months ago #123385 by zymo
Replied by zymo on topic Re: Simple image gallery in intro text
Are you sure it recognizes {gallery} as an HTML tag? Because it does not strip it from the intro text.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123386 by Yiota
Replied by Yiota on topic Re: Simple image gallery in intro text
Gallery is rendered in ul and li elements. If you strip the ul element then your gallery will be stripped.

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

More
10 years 8 months ago #123387 by zymo
Replied by zymo on topic Re: Simple image gallery in intro text
I see that now. But the problem is still the same, it strips the intro text of any other html tags(even if I manually make a list, the tags get removed) but the gallery still remains in the intro text.

I have tried with a fresh installation of joomla,K2 and simple image gallery and nothing changed.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123388 by Yiota
Replied by Yiota on topic Re: Simple image gallery in intro text
Is it possible to provide a link to your page?

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

More
10 years 8 months ago #123389 by zymo
Replied by zymo on topic Re: Simple image gallery in intro text
How can I send you a PM or an e-mail? I need to send you the log-in details because this is a closed test site and you also need them for the back-end I guess.

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

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 8 months ago #123390 by Yiota
Replied by Yiota on topic Re: Simple image gallery in intro text
Try to provide them through our contact form.

Thank you.

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


Powered by Kunena Forum