My goal is to create a second forum. I created a new content type called forum2 and added taxonomy_forums term reference to it.
Drupal automatically creates links for each content type.
I would like to display links based on the forum topics. For example ,
-
namesite/forum/1 – only New topic link is visible
-
namesite/forum/4 – only link for forum2 is visible
and so on.
here is what I did
function theme_advanced_forum_node_type_create_list(&$variables) { $forum_id = $variables['forum_id']; // Get the list of node types to display links for. $type_list = advanced_forum_node_type_create_list($forum_id); $output = ''; if ($forum_id == 1 || $forum_id == 2) { $output .= '<div class="forum-add-node forum-add-forum">'; $output .= theme('advanced_forum_l', array( 'text' => 'Add to forum', 'path' => $type_list['forum']['href'], 'options' => NULL, 'button_class' => 'large', )); $output .= '</div>'; } elseif ($forum_id == 3 || $forum_id == 4) { $output .= '<div class="forum-add-node forum-add-forum2">'; $output .= theme('advanced_forum_l', array( 'text' => 'Add to forum2', 'path' => $type_list['forum2']['href'], 'options' => NULL, 'button_class' => 'large', )); $output .= '</div>'; } else { // User did not have access to create any node types in this fourm so // we just return the denial text / login prompt. $output = $type_list; } return $output; }
Any help would be greatly appreciated