4

Has anyone ever successfully integrated the ExpressionEngine Discussion Module within regular templates?

I can include the code {exp:forum} into one of my templates and this successfully brings up the forum home page, but I get a 404 error on every link.

This happens because EE is writing out the forum links incorrectly.

Rather than this hyperlink being output:

/members/discussion-board/viewforum/1/

I get something like this instead:

/members/viewforum/1/

I understand that changing the forum URL to use {segment_2} instead of {segment_1} requires some additional setup.

I have followed the instructions for Running the Forums Through Regular Templates with no luck. Any help is much appreciated.

I am using ExpressionEngine v2.2.2 with the Discussion Forum Module v3.1.4.

rjb
  • 9,036
  • 2
  • 44
  • 49
digiwig
  • 621
  • 1
  • 9
  • 21

1 Answers1

1

To enable the ExpressionEngine Discussion Forum to run as a different URL — on the second segment {segment_2} — you'll need to configure EE to run the forum through regular templates.

This question has been asked and answered on Stack Overflow before, but if you've already created the group and template, you just need to:

  1. From the Control Panel, go to Add-Ons > Modules > Discussion Forum > Default Preferences
  2. Configure your Forum Board Preferences to the following:

Forum Forum Board Short Name: discussion-board
Forum URL: http://example.com/index.php/members/discussion-board/
Forum Triggering Word: <empty>

At this point, your forum will then be run inside the regular EE templating engine.

The forum is then accessed through whichever template you created above — the template name is used in place of the "trigger" word:

http://www.example.com/members/discussion-board/

Community
  • 1
  • 1
rjb
  • 9,036
  • 2
  • 44
  • 49