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.

gallery in generic or tag layout

  • Shannon Briggs
  • Shannon Briggs's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago - 12 years 3 months ago #50358 by Shannon Briggs
gallery in generic or tag layout was created by Shannon Briggs
Hi,

I'm wanting to display a gallery in the K2 tag layout.
Unfortunately there are no parameters to display a gallery in the tag layout, and inserting  <?php echo $item->gallery; ?> into the tag.php file only displays the following: {gallery}36{/gallery} (I'm assuming "36" was the ID number of the gallery associated with that particular item).

Anyone savvy enough with PHP to be able to tell me how I can achive this in the tag.php file?

Thanks

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

More
12 years 3 months ago #50359 by Katia
Replied by Katia on topic Re: gallery in generic or tag layout
You may use SIG PRO either by using the K2 gallery tab in each K2 item or by writing SIG PRO tags inside joomla! articles content area or K2 items.

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

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

  • Shannon Briggs
  • Shannon Briggs's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #50360 by Shannon Briggs
Replied by Shannon Briggs on topic Re: gallery in generic or tag layout
yes I understand that is how it works "straight out of the box" Katia, but I'm needing to use it in a slightly unconventional way - and I know it can be done. This forum is as good a place as any to discuss how an override could be written. All for the greater good of the plugin..  ;)

Well, I guess I'll have to work out how to do a database query for this problem..

It's actually a real shame that it doesn't display in a K2 Tag layout. perhaps that is something that could be brought into future versions of this plugin and K2.

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

More
12 years 3 months ago #50361 by Laurent van Roy
Replied by Laurent van Roy on topic Re: gallery in generic or tag layout
This kind of problem is due to the order of plugin execution.

As far as I can see (I'm in J!1.15.20):

The replacement of the "{gallery}...{/gallery}" is done by the SIG plugin.
Th execution of the plugin is triggered by events.
Example from com_k2/item.php:
<?php echo $this->item->event->AfterDisplayContent; ?>

The problem is that tag.php doesn't trigger any event and thus doesn't trigger the SIG plugin.
The translation of "{gallery}...{/gallery}" to the real gallery doesn't occur.

Solutions: I would try to trigger the right event in the tag.php file.
Attention: this may lead to nasty effects. Thus to be tested.

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


Powered by Kunena Forum