Hi All,
This is a question about best practice. When we want to display different templates for different urls, what is best way to code this in the theme. For example I have code like this in my theme
if (preg_match('/forum\/view.php/', $PAGE->url)) {
// All the forum view pages need new templates
echo $OUTPUT->render_from_template('theme_boostexamplecontentpage', $templatecontext);
} else {
// Show old templates for other pages
echo $OUTPUT->render_from_template('theme_boostexample/contentpage_2', $templatecontext);
}