Bug 34863 - Allow definition of custom url for pages
Summary: Allow definition of custom url for pages
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 13:05 UTC by Andrew Fuerste-Henry
Modified: 2025-07-09 23:41 UTC (History)
10 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2023-09-21 13:05:52 UTC
When creating pages in Tools, it's be helpful to give a page a custom url based on a unique string. So one could give the page a slug like "longoverdues" and then have a url like "/cgi-bin/koha/tools/page.pl/longoverdues" or something more human-readable and human-rememberable.
Comment 1 Lisette Scheer 2023-09-25 17:22:56 UTC
+1
Comment 2 David Cook 2024-05-16 01:53:10 UTC
+1
Comment 3 George Williams (NEKLS) 2024-08-15 20:47:56 UTC
+1
Comment 4 Juliet Heltibridle 2024-08-15 20:48:28 UTC
+1
Comment 5 David Cook 2025-07-09 23:31:52 UTC
Still think this is a cool idea and in theory shouldn't be hard to do.

For anyone interested in writing this, check out "svc/bib" and it's use of $query->path_info(). Basically, the controller gets matched using part of the URL and then the rest of the URL is passed to the code in the path info. 

Either in page.pl or in a prettier path like "/cgi-bin/koha/page/longoverdues". I think we'd want something like "/page/" so we don't have potential conflicts with other parts of Koha.

Routing by path is easy when using Plack/PSGI or Mojolicious, but harder when just using CGI. Of course, hopefully at some point we'll remove the CGI option (bug 39305 for a step in that direction...).

Of course, another option is to just make /cgi-bin/koha/tools/page an Alias of /cgi-bin/koha/tools/page.pl in Apache but that's suboptimal in the long-run as it just entrenches us further into Apache.
Comment 6 David Cook 2025-07-09 23:41:02 UTC
(In reply to David Cook from comment #5)
> Still think this is a cool idea and in theory shouldn't be hard to do.

That said, I'm unlikely to work on this without sponsorship :|. I've got too many other in-demand tasks.

But if someone else works on it, I'm happy to review it as it would be a great addition to Koha.