Keyword

Controlling K2 plugin appearance area

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar Topic Author
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 2 months ago #101062 by Kannan Naidu Venugopal
Controlling K2 plugin appearance area was created by Kannan Naidu Venugopal
Hi Guys,

I have a custom plugin for K2 that displays contact details, social media urls and a small logo, at the moment the plugins display here (K2AfterDisplayContent) - item view :-
					
K2 Rocks \m/

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

More
12 years 2 months ago #101063 by Lefteris
Replied by Lefteris on topic Re: Controlling K2 plugin appearance area
Hi. K2 provides several hooks for K2 plugins. So you can pick one of them. Also you can move the events around inside the layout depending on your needs. Finally all the plugin events are passing the item object by reference. This means that you can add custom properties in the item object depending on your needs. Then you can access those properties in the layout file.

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

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar Topic Author
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 2 months ago - 12 years 2 months ago #101064 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Controlling K2 plugin appearance area
Hi Lefteris,

Thanks for the reply, i will use the other hooks for the plugin. However, is it possible the use the <field> instead of the <param> to show the backend form in the plugins tab ?

If i use this, it shows....
					
K2 Rocks \m/

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

More
12 years 2 months ago #101065 by Lefteris
Replied by Lefteris on topic Re: Controlling K2 plugin appearance area
Unfortunatelly, the JForm fields are not supported by K2 plugins. But you can define an element and have any field you like by doing something like:
<params group="item-other" addpath="/plugins/k2/yourplugin/elements">
<param name="yourElementName" type="yourElementType" label="XXX" description="XXX" />

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

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

More
12 years 2 months ago #101066 by Lefteris
Replied by Lefteris on topic Re: Controlling K2 plugin appearance area
The above assumes that you have some knowledge about how to define form elements. If not you can take a look at exisitng elements bundled with K2 under /administrator/components/com_k2/elements

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

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar Topic Author
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 2 months ago - 12 years 2 months ago #101067 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Controlling K2 plugin appearance area
Hi Lefteris,

Thank you very much, unfortunately i still have a lot to learn :D

i'm using a different method now to display the image, extra work and it works.

Thanks again.

K2 Rocks \m/

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

More
11 years 24 minutes ago #101068 by Jacqueline
Replied by Jacqueline on topic Re: Controlling K2 plugin appearance area
Hi,

I encounter this kind of problem. In my k2, I have installed k2 Store and k2 Link Items. and it displays in the same area with the events <?php echo $this->item->event->K2AfterDisplay; ?> ..

I want to move k2 Link Items in a different area in my page. How did you manage to do it? please help.

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