BuddyDev

Search

Overriding templates


  • Participant
    Level: Guru
    Posts: 617
    calu on #29842

    Hi Brajesh, a quick clarification to what you wrote about overriding templates, but not the core files of a plugin.

    What about overwriting nav.items, and sub.nav.items, are they core files, or can I overwrite these?

    I have been looking for them, but can’t find them in templates, so are they core files?

    Regards
    Carsten


  • Keymaster
    (BuddyDev Team)
    Posts: 14737
    Brajesh Singh on #29885

    Hi Carsten,
    Thank you for the question.

    with template overrides, you can control what is generated by a template. There are times that a template uses some functions which are provided by plugins and they generate their own output.

    Whether you can modify the output of them or not is dependent on them.

    In case of BuddyPress, you can not modify the User/Group navs by template override. They are content generated from a plugin function. You can completely hide them from the template though. Doing it for individual nav item is not feasible via template override currently.

    As of user sub nav, you can do template override in some cases and not in other. It is not well standardize(It is generated currently but leftovers form past do allow template override for some).

    As of group sub navs, you can override them in most of the case.

    Regards
    Brajesh


  • Participant
    Level: Guru
    Posts: 617
    calu on #29904

    Hi Brajesh, thank you for the clarification on this, you say I can completely hide them from the template, is that with css, you mean?

    It has proven to be not an easy task to delete all tabs and navs, can you provide me with an over all class if such exist, so far I have hiding the tabs and navs, using these classes, but sub navs’s stil display on mobile.

    div#item-nav {
    display: none;
    }

    #subnav {
    display: none;
    }

    .button-nav {
    display: none;
    }

    Regards
    Carsten


  • Participant
    Level: Guru
    Posts: 617
    calu on #30058

    Hi Brajesh, you wrote about overriding navs, that I can completely hide the navs, and in some cases override user sub nav.

    Where can I see an overview of these templates, and is there some documentation on the process?

    If I make a completely override to hide all navs, does this block for adding navs elsewhere on the page?

    Regards
    Carsten


  • Keymaster
    (BuddyDev Team)
    Posts: 14737
    Brajesh Singh on #30063

    Hi Carsten,
    It is inside bp-templates/your-template-pack(bp-nouveau or bp-legacy)/buddypress/members/single/

    Check home.php/members-header.php for the details.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved
Subscribe