Build node list so categories are identified by color

LPH

Well-known member
I'm trying to build a node list in a WordPress meta box. The list of nodes is showing fine. Now, I'm trying to figure out how to get the categories to show in red ( node_type_id = "Category" ) and the "node_id = Forum" to be in blue.

I don't see a way, though, to get node_type_id and node_id showing in a list.

PHP:
    $forums = XenForo_Model_Node::create('XenForo_Model_Node') -> getModelFromCache('XenForo_Model_Node') -> getAllNodes($ignoreNestedSetOrdering = false, $listView = true);

    echo '<select id="xenword_forum_id" name="xenword_forum_id" >';
    foreach ( $forums as $forum ) {
        echo '<option value="' . $forum['node_id'] . '"';
        echo ' selected="selected"';
        echo '>' . $forum['title'] . '</option>';
    }
    echo '</select>';

Does anyone have a suggestion? Is there a way to put a conditional inside the area with the $forum['title'] so there are colors?
 
This question could also be: how do I get the node list to indent when it is forum and bold when returning a category?

Has anyone tried to get a return list of nodes without template edits?
 
Back
Top Bottom