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

Need help editing the node_list categories loop

Discussion in 'Styling and Customization Questions' started by shock, Sep 22, 2011.

  1. shock

    shock Member

    I wanna do a CS mod, that means that the categories are going to float in groups with their forums.
    To do that i need to edit the loop that exports the forums and categories... and i dont have any idea from where to start...

    where can i learn the xenforo syntax? and where are all right files?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You want this template:

    Admin CP -> Appearance -> Templates -> node_category_level_1

    That contains the HTML for level1 categories.
  3. shock

    shock Member

    Thanks, one more question, can you explain me how to export a html line if this is the 3rd row?
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I'm not sure I understand. Can you give me an example?
  5. shock

    shock Member

    here you haev my demo board(sorry, its hebrew), im using on it phpbb3, as you can see in the main page, i did that the categories are in blocks, in this style i didnt tables, so i needed to do after every 3 categories this line: <div style="clean:both"></div>
    bacause if i didnt output the code, the categories didnt fited good in their place.

    well, this is what i want to do in xenf, to put that code every 3 categories.

    LOL, i forgot the link hh: http://wopsh.com
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I did some testing and I was unable to create a running count of categories using template syntax. But you can manually specify every 3rd catid:

    <xen:if is="in_array({$category.node_id}, array(1,2,3))">
    Fuhrmann likes this.
  7. shock

    shock Member

    i gues ill need to it the hard way... :(
    anyway, thank you very very much!!!
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh here is another idea. If you tightly manage the display orders of your categories then you can use this condition:

    <xen:if is="{$category.display_order} % 3 == 0">
    That will be true for every third category (display orders 3, 6, 9, etc).
    Fuhrmann and Shelley like this.
  9. shock

    shock Member

    yes, this is exacly what i need :)
    you dont have any idea about how much you helped me with this code :)
    thank you again!

Share This Page