Bug 27527 - Plugin hooks to create additional contents
Summary: Plugin hooks to create additional contents
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Plugin architecture (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 27033 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-22 14:19 UTC by Jonathan Druart
Modified: 2022-01-08 01:09 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 27527: Additional content plugin (3.70 KB, patch)
2021-01-22 15:22 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27527: Add new page to integrate the content to Koha correctly (3.17 KB, patch)
2021-01-22 15:22 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-01-22 14:19:14 UTC
It would be useful to let plugin create contents that we will integrate into Koha.

The idea is to have a hook (on the main page for instance) that will retrieve a list of URL that will be displayed at the end of the page.

The URL could be:
- A link to an external website
- A link to an existing view of Koha
- A link to a specific content

The specific content would be returned by the plugin and displayed nicely integrated into Koha.
Comment 1 Jonathan Druart 2021-01-22 15:22:45 UTC
Created attachment 115698 [details] [review]
Bug 27527: Additional content plugin

Sponsored-by: Orex Digital
Comment 2 Jonathan Druart 2021-01-22 15:22:48 UTC
Created attachment 115699 [details] [review]
Bug 27527: Add new page to integrate the content to Koha correctly

Sponsored-by: Orex Digital
Comment 3 Jonathan Druart 2021-01-22 15:24:23 UTC
Test plan:
1. Apply the patches
2. Download the "additional contents" plugin at https://gitlab.com/joubu/koha-plugin-additional-contents/-/releases
3. Install it
4. Configure it
Example:
Create an internal link: https://snipboard.io/vsQadW.jpg
Create an external link: https://snipboard.io/IPsjlz.jpg
Create a content: https://snipboard.io/HT1kxi.jpg
Note that if the URL is filled the content will be ignored.
Note that you can choose "mainpage" or "tools-home" for the "page" input.

The table lists the different contents you created: https://snipboard.io/YAdKzC.jpg

The appears on the main page: https://snipboard.io/N2IRsK.jpg

Click the links.
You should be redirected correctly.

For the link that point to a specific content you will see: https://snipboard.io/91ezAG.jpg
Comment 4 Jonathan Druart 2021-01-22 15:24:45 UTC
This has been developed for a very specific need and I don't know if it has to be part of Koha core. If people are interested, both the plugin and the code here will have to be improved (it's not ready yet).

Also we will think how it could be extended for other uses.
Comment 5 Fridolin Somers 2022-01-08 01:09:05 UTC
*** Bug 27033 has been marked as a duplicate of this bug. ***