We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Forum menu link: how to redirect to a specific forum group | Forum

Topic location: Forum home » Support » General Questions
S. Bourdon
S. Bourdon Aug 2 '13
Hello,


Since I only have one forum on my website, I would like the Forum link in the menu to redirect users straight to that forum.


In other words, instead of going to /forum, I would like it to go to /forum/2.


I guess I would have to modify forum/init.php, but my attempts at modifying the code were unsuccessful...


I think that's the part that needs to be modified:


OW::getRouter()->addRoute(new OW_Route('forum-default', 'forum', 'FORUM_CTRL_Index', 'index'));

OW::getRouter()->addRoute(new OW_Route('customize-default', 'forum/customize', 'FORUM_CTRL_Customize', 'index'));

OW::getRouter()->addRoute(new OW_Route('group-default', 'forum/:groupId', 'FORUM_CTRL_Group', 'index'));

OW::getRouter()->addRoute(new OW_Route('topic-default', 'forum/topic/:topicId', 'FORUM_CTRL_Topic', 'index'));


Any suggestions would be greatly appreciated!


Thank you very much!

The Forum post is edited by S. Bourdon Aug 2 '13
Kяuncн Leader
Kяuncн Aug 5 '13
If by Menu you mean navigation bar then simple, head over to /admin/pages/manage and hide/drag the default Forum to Hidden Pages section then recreate/Add Item to what you need.
S. Bourdon
S. Bourdon Aug 5 '13
Doh!


I first tried with the "local page" option but couldn't get it to work. With the "External URL" on the other hand, it works perfectly well!
Thanks for pointing me in the right direction!

Daisy Team
Daisy Aug 7 '13
Topic was moved from Custom Code Modifications.