# Land on Group Messages Component

**URL:** https://meta.discourse.org/t/land-on-group-messages-component/214097
**Category:** Theme component
**Tags:** deprecated
**Created:** [January 6, 2022, 9:54pm UTC](https://meta.discourse.org/t/land-on-group-messages-component/214097 "2022-01-06T21:54:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [January 6, 2022, 9:54pm UTC](https://meta.discourse.org/t/land-on-group-messages-component/214097/1 "2022-01-06T21:54:22Z")

</div>

This Theme Component redirects links to Groups so that they land on the Group Messages rather than on the Group Members.

The use-case for this is when your Forum makes extensive use of Groups, but you don’t want to set up an individual Category for private communications for each one.

The `/g/group-slug/messages` page can function as a topic list for these Groups without any further admin input. Unfortunately, these pages are somewhat buried, and several clicks are required to reach them.

This Component makes the Group Messages page the default landing page whenever a Group is clicked upon. This makes finding and using Group Messages (especially older ones) much more intuitive for users. It only does this when

1. Group messages exist for the group _and_
2. The user is a member of the group

This Component was made to formalise the amazing support of @Johani as a result of this conversation:

> [@Change the default group pages to /messages](https://meta.discourse.org/t/change-the-default-group-pages-to-messages/212123):
>
> Hi, When accessing groups from the /g page, is there a way to have the group URL it points to be /g/group-slug/messages instead of /g/group-slug/members? We’ve got several groups that are used for group messages. It would be helpful to give people one less click to reach the messages for their group. This is more important to us than the view of group members. I know that I can do this by a direct link, but I want it to be from the /g?type=my page which is helpfully dynamic and user-centred.

There are no settings. Simply install and activate it.

| | | |
| --- | --- | --- |
| 🛠 | **Repository** | [github.com/nathan-nz/discourse-group-messages-land](https://github.com/nathan-nz/discourse-group-messages-land) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [June 26, 2022, 11:15am UTC](https://meta.discourse.org/t/land-on-group-messages-component/214097/2 "2022-06-26T11:15:31Z")

</div>

Just updated the TC so it no longer throws a warning in the browser console:

[https://github.com/nathan-nz/discourse-group-messages-land/commit/5e79ca2fc50945d09613aebf2f147affca50084c](https://github.com/nathan-nz/discourse-group-messages-land/commit/5e79ca2fc50945d09613aebf2f147affca50084c)

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [November 11, 2022, 9:32pm UTC](https://meta.discourse.org/t/land-on-group-messages-component/214097/3 "2022-11-11T21:32:28Z")

</div>

There is a problem with the component at the mo, manifesting on the `/g` page:

> [@All groups are not anymore displayed in group page](https://meta.discourse.org/t/all-groups-are-not-anymore-displayed-in-group-page/244964):
>
> Hello. First, thank you to the team for all the great job for Discourse ! Since 2.9.0.beta11, the group page ( mydomain/g ) shows only 2 groups. If I filter by name, I can find the other groups. The request /g.json shows all the groups of our instance. So, is there a parameter who changed between beta10 and beta11 which makes groups not displayed in the group page ?

It seems to be related to this commit in core:  
[https://github.com/discourse/discourse/commit/58e59e357964533c2734b054e78f5c0824ca60f8](https://github.com/discourse/discourse/commit/58e59e357964533c2734b054e78f5c0824ca60f8)

I’ve temporarily turned off the functionality on that page until I can get it fixed properly:

[https://github.com/nathan-nz/discourse-group-messages-land/commit/6ba623d94e76f503e55398be9c6bd2cd364422b2](https://github.com/nathan-nz/discourse-group-messages-land/commit/6ba623d94e76f503e55398be9c6bd2cd364422b2)

## Also new feature - adding Sidebar compatibility

While at it, I’m also very keen to add compatibility with the new #sidebar.

I’m trying to work out how to redirect the group message links on the Sidebar which currently go to this:

- `/u/username/messages/group/group-slug`

I’d like them to go to this instead:

- `/g/group-slug/messages`

Can anyone help with either of these? Both are too high level for me.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [July 18, 2024, 2:58am UTC](https://meta.discourse.org/t/land-on-group-messages-component/214097/5 "2024-07-18T02:58:42Z")

</div>

I don’t think that this component really has a place any longer (if it works at all). Therefore I’ve placed a #deprecated tag on it.
