1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Build node list so categories are identified by color

Discussion in 'XenForo Development Discussions' started by LPH, Jan 18, 2015.

  1. LPH

    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.

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

    '<select id="xenword_forum_id" name="xenword_forum_id" >';
        foreach ( 
    $forums as $forum ) {
    '<option value="' $forum['node_id'] . '"';
    ' selected="selected"';
    '>' $forum['title'] . '</option>';
    Does anyone have a suggestion? Is there a way to put a conditional inside the area with the $forum['title'] so there are colors?
  2. LPH

    LPH Well-Known Member

    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?

Share This Page