Skip to:
Content
Pages
Categories
Search
Top
Bottom

Duplicating Components


  • Scotm
    Participant

    @scotm

    I realize you can change component slugs and labels as per the development doc provided. But what if you’d like to duplicate the entire functionality of an existing component, say Groups, so that you could still have Groups and perhaps a renamed component called ‘Companies’?

    Is this possible?

Viewing 1 replies (of 1 total)

  • Boone Gorges
    Keymaster

    @boonebgorges

    Yes, it should be possible, but it’d be pretty complicated, as the codebase for the groups component is pretty large and complicated. An alternative method might be to add a piece of groupmeta to certain groups flagging them as ‘companies’, and then using that metadata to enable the separate display of company-groups and non-company-groups around the site. Or, what might be easier given the way that bp_has_groups is written (and given the fact that your company filters would largely be on the output of bp_has_groups) is to store an array somewhere of group_ids corresponding to company-groups and non-company-groups, and then feed it as the $include argument to bp_has_groups in your theme template.

Viewing 1 replies (of 1 total)
  • The topic ‘Duplicating Components’ is closed to new replies.
Skip to toolbar