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

XF 1.4 Different style/theme/logo per subforum

Discussion in 'Styling and Customization Questions' started by Furai, May 5, 2015.

  1. Furai

    Furai Member

    Hello,

    Is it possible to make xenforo use different logo, style, background, different set of themes per subforum?
    If yes, how could I achieve that? Any tips/ideas are highly welcome.

    Thanks in advance.

    Regards,
    Furai
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is the option to set the style per node:
    upload_2015-5-5_9-38-22.png

    Be aware though that having tens of styles will result in slower rebuild times.
     
  3. EQnoble

    EQnoble Well-Known Member

    You could do that with different styles and forcing them by node as in the image above or you could use conditionals and template edits/mods targeting node ids if you don't want to increase loads, AKA custom development.
     
  4. Furai

    Furai Member

    I'd prefer crafting something custom. I've considered in past forcing themes by node but then I'd limit my users to only one theme.

    EDIT:
    Where to start?
     
    Last edited: May 5, 2015
  5. Furai

    Furai Member

    So no one has any pointers for me? Any tips? I really don't know much about modding XenForo.
     
  6. Russ

    Russ Well-Known Member

    What do you mean by "crafting something custom", what exactly would you want to do, at least a general idea so we can point you in the right direction :)
     
  7. Furai

    Furai Member

    In the OP I've said what I want to get done. I don't know what can I use to do that.

    Let's say that I have subforum which I want to look like full forums but with different logo and different background for every theme/different pool of themes to choose from.
    I know that I should modify templates for nodes in order to make subforums look like full forums. Haven't figured out that yet as I don't understand that whole XF template language.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    You would need to edit the top level templates and use conditional statements to achieve background, logo, header changes, etc.
     
    Last edited: May 11, 2015
  9. Furai

    Furai Member

    That sounds promising. Any tutorial around for editing templates?
     
  10. Furai

    Furai Member

    So, I've started looking through node_forum_level_2 template and I found this:
    Code:
        <xen:if is="{$renderedChildren} AND {$level} == 2 AND 1==2">
           <ol class="subForumList">
           <xen:foreach loop="$renderedChildren" value="$child">
             {xen:raw $child}
           </xen:foreach>
           </ol>
         </xen:if>
    That if clause makes completely no sense. Can someone enlighten me? I mean the last part. How the hell 1 can equal 2? :)
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    That sounds like something you have added yourself or from a custom style.

    I'm not seeing that in a default template for 1.4 or 1.5.
     
  12. EQnoble

    EQnoble Well-Known Member

    Code:
            <xen:if is="{$renderedChildren} AND {$level} == 2 AND !@nodeListSubForumPopup">
                <ol class="subForumList">
                <xen:foreach loop="$renderedChildren" value="$child">
                    {xen:raw $child}
                </xen:foreach>
                </ol>
            </xen:if>
    I believe that is the default code that should be in place of the block of code you posted.
     
  13. Furai

    Furai Member

    I'm sure I haven't touched it...hmm. I'll look at it again.
     
  14. EQnoble

    EQnoble Well-Known Member

    What version of XF are you running at the moment?
     

Share This Page