forum_theme_suggestions_forums(array $variables)
Implements hook_theme_suggestions_HOOK().
File
- core/modules/forum/forum.module, line 363
- Provides discussion forums.
Code
function forum_theme_suggestions_forums(array $variables) { $suggestions = array(); $tid = $variables['term']->id(); // Provide separate template suggestions based on what's being output. Topic // ID is also accounted for. Check both variables to be safe then the inverse. // Forums with topic IDs take precedence. if ($variables['forums'] && !$variables['topics']) { $suggestions[] = 'forums__containers'; $suggestions[] = 'forums__' . $tid; $suggestions[] = 'forums__containers__' . $tid; } elseif (!$variables['forums'] && $variables['topics']) { $suggestions[] = 'forums__topics'; $suggestions[] = 'forums__' . $tid; $suggestions[] = 'forums__topics__' . $tid; } else { $suggestions[] = 'forums__' . $tid; } return $suggestions; }
Please login to continue.