Hi everyone,
Elgg offers a facility to manage our plugin pages via custom routes as explained here. But I have some troubles for defining some routes.
I want to register a route with a particular path.
The path will start with the "permalink' and the remaining part of the path is not predefined. So the remaining part of the path can contain any valid relative url.
The remaining part of the path can be something like this default/370/where-does-it-come-from-where-does-it-come-from-where-does-it-come-from?ps=cdab518b47b0fe0a1fa802b752f224e4.
So the final path can be
/permalink/default/370/where-does-it-come-from-where-does-it-come-from-where-does-it-come-from?ps=cdab518b47b0fe0a1fa802b752f224e4
I have the same trouble with walled_garden.
How can I register such route in elgg-plugin.php ?
return [
'bootstrap' => \Pessek\Piwal\Bootstrap::class,
'routes' => [
'pessek:permalink' => [
'path' => '/permalink/{?}',
'resource' => 'Pessek/permalink',
],
],
];
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker
Jerome Bakker - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
You must log in to post replies.your path should look like '/permalink/default/{guid}/{title?}'
It's in the basis no different that a blog route https://github.com/Elgg/Elgg/blob/79e9b53fc351a5535719fc86d7ccd7b8f27cc7f8/mod/blog/elgg-plugin.php#L47-L50
Thanks a lot