Keyword

Jx Include Item K2 content plugin

  • Olle Johansson
  • Olle Johansson's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #75144 by Olle Johansson
Jx Include Item K2 content plugin was created by Olle Johansson
Here is a preview of the plugin that I'm developing for K2 right now.

It is used to show data from an external K2 item when displaying an item. When editing an article you get an extra field to enter the ID of another item. This id will then be used to grab extra data from and insert into the article.

There's a plugin parameter to edit, called "Shown Fields". This is to select the id numbers of the fields to display. If you enter a link text, that text will be used as a link to the full external item.

It's still very rough, so don't expect too much. There are css classes on the information, but you will have to add them yourself to your css file to get it looking good.


Still to do:
* Article selector. Having trouble with this since the article list will have to be loaded from Joomla. Maybe this could be added to the K2 core as an added element, as I believe it is useful for more than this plugin.
* A proper template view, to easier setup the look of the information.
* Being able to display all data from the item, not just extra fields.
Attachments:

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

More
14 years 6 months ago #75145 by Manny Santos
Replied by Manny Santos on topic Jx Include Item K2 content plugin
Have you seen the Include Content Item" plugin from php-gtk2 cookbook? This works great by just typing the code "include_content_item" and the id of the article.

I use this with Jtabs and put this code multiple times within each tab and it picks up the external article and puts it in the tabs of the main article.

This allows me to create an article about a trip for a travel agency and have categories with articles such as : rates, inclusion, hotel info etc... so that the clients could go to the appropriate article and edit without messing with the main article layout.

The only problems is that this plugin works in a K2 article but can only pick up from standard com_content articles. If you could make your plugin work similar and pick up articles from K2, that would be awsome. Thanks for the plugin so far and hope that you keep updating it.

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

  • Olle Johansson
  • Olle Johansson's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #75146 by Olle Johansson
Replied by Olle Johansson on topic Jx Include Item K2 content plugin
Well... Adding the possibility to enter a code in the article to have multiple articles isn't a problem really. But because of the way K2 handles the data model, it might be a bit of work to get complete articles with the proper template and everything.

Manukat said:Have you seen the Include Content Item" plugin from php-gtk2 cookbook? This works great by just typing the code "include_content_item" and the id of the article.
I use this with Jtabs and put this code multiple times within each tab and it picks up the external article and puts it in the tabs of the main article.

This allows me to create an article about a trip for a travel agency and have categories with articles such as : rates, inclusion, hotel info etc... so that the clients could go to the appropriate article and edit without messing with the main article layout.

The only problems is that this plugin works in a K2 article but can only pick up from standard com_content articles. If you could make your plugin work similar and pick up articles from K2, that would be awsome. Thanks for the plugin so far and hope that you keep updating it.

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

More
14 years 6 months ago #75147 by Manny Santos
Replied by Manny Santos on topic Jx Include Item K2 content plugin
I was thinking not the whole article, it would just include the text content from an external k2 article. The original main article would deal with templates, main image, extra fields etc... as normal.

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

  • Olle Johansson
  • Olle Johansson's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #75148 by Olle Johansson
Replied by Olle Johansson on topic Jx Include Item K2 content plugin
Then it should be quite an easy fix. =) I'll get it added next time I work on it.

Manukat said:I was thinking not the whole article, it would just include the text content from an external k2 article. The original main article would deal with templates, main image, extra fields etc... as normal.

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

More
14 years 1 month ago #75149 by FeSys
Replied by FeSys on topic Jx Include Item K2 content plugin
Waiting for your magic " Olle Johansson "..

Olle Johansson said:Then it should be quite an easy fix. =) I'll get it added next time I work on it.
Manukat said:I was thinking not the whole article, it would just include the text content from an external k2 article. The original main article would deal with templates, main image, extra fields etc... as normal.

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


Powered by Kunena Forum