BuddyDev

Search

Group Tabs dynamic url remove last /

Tagged: 

  • Participant
    Level: Initiated
    Posts: 2
    light on #50855

    I’m trying to use the dynamic url [displayed-group-url] for a group tab in the following format

    Group: site.com/groups/demo/
    URL I want: site.com/groups/demo-year-1/

    If I use [displayed-group-url]-year-1, then the URL becomes site.com/groups/demo/-year-1/

    How can I remove the last / after the group name in this case?

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #50868

    Hi,
    Thank you for the question.

    I am sorry, I am not sure I understand properly.

    1. is this your current group? ite.com/groups/demo/
    2. In that case, isn’t ite.com/groups/demo-year-1/ a new group and not a sub page of current group?

    Please help me understand and I will assist you with it.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 2
    light on #50883

    Hi Brajesh, thanks for your reply.

    Yes, the current group is site.com/groups/demo/

    I want to create a tab inside site.com/groups/demo/ that links to a separate group (subgroup of the /demo/ group) with the url: site.com/groups/demo-year-1/

    But I want to apply this to many different groups such as /demo2-year-1/, /demo3-year1/ etc, and I would associate the tab with groups of a certain type (demo, demo2, demo3 would all have the same group type).

    Using the dynamic URL [displayed-group-url] would save me from making an individual added tab for each separate group if I was to use [displayed-group-url]-year-1, but the last / output by the dynamic URL prevents me from doing this as it would output the url as site.com/groups/demo/-year-1/ instead of the required site.com/groups/demo-year-1/

    Hope this is clearer?

  • Keymaster
    (BuddyDev Team)
    Posts: 24577
    Brajesh Singh on #50898

    Hi,
    Thank you for the reply.
    I am sorry for the delayed response.

    we are not adding the trailing slash. It is BuddyPress/BuddyBoss whose bp_get_group_permalink() is doing it.

    Yes, we can add a filter to allow you do it. You can run untrailingslash on the permalink to achieve your goal.

    We will push an update this week with the same.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved