How can I change the default route link of blog from "mysite.com/blog/all" to "mysite.com/article/all" and also manipulates all route with article instead of blog.
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.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- dipali kavar vidja@dipali
dipali kavar vidja - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- dipali kavar vidja@dipali
dipali kavar vidja - 0 likes
You must log in to post replies.Read this tutorial.
In your case, you should rewrite the requests for
blog/*
toarticle/*
:@RvR Thanks for reply, i already did this, but i am getting page not found when i am going to open mysite.com/article/all
let me show you how i written code.
elgg_register_plugin_hook_handler('route:rewrite', 'blog', 'blog_rewrite_handler');
function blog_rewrite_handler($hook, $type, $value, $params) {
$value['identifier'] = 'article';
return $value;
}
also i have put this hook handler out of 'init','system' hook.
It should go the other way around, you want to 'article' routes to be handled by the blog plugin.
so your rewrite hook should be on 'artilce' and then return 'blog'. that way all requests will be handled by the blog plugin
@Jerome Bakker Thanks for reply, changed as per your guidance its working now.