What would be the best way to make a category "redirecting" people to another website?


Context: I’m working on an international forum which have a few subcategories for some languages and we’re reorganizing it all.

We currently have categories such as:

Since only German is active, this this the only subcategory we’ll be keeping.
However, we’d like to add French and make this category somehow redirect to a French other Discourse instance.

So I’m not sure what’s the best way to do it.

Make a French subcategory with only one topic containing a link to the French Discourse?
It makes a lot of clicks to go to the French Discourse. Category -> Subcategory -> Topic -> Link

Make the category link directly open the French Discourse in a new tab? Is such a thing possible?

Any other idea? :thinking:

Why aren’t you offering the French site via a header link, or similar?

1 Like

We don’t specifically want to put such emphasis on any other language than English. 99% of the posts are written in English. Such a link in the header or somewhere always visible will be of no interest to the vast majority of users.

But we do want to have a link somewhere to let French speakers that an active French forum exists, and since we already have language-related categories, I think letting people know about the French forum through them would be the most convenient place.

Create a French category and make a simple theme component that intercepts any request to it (using api.onPageChange() or so ) and redirects to the French Discourse instead.


Don’t know how to do such a thing, but I’ll have a look at it :slight_smile:

edit : I’ll tried this:

    api.onPageChange((url) => {
        if (url === "/c/site-feedback/2"){
            window.location.href = "https://forum.monocycle.info";

The result is not right for the user since the script is executed where we’re on this category.
So, the forum first loads the category page, and then redirect the user to the other website.

And then if we go back to the previous page in our browser, it goes back to the category page which redirects again automatically to the new url. It’s irritating.

Maybe the new url should open in a new tab when we click on the category in the category selector, but not let the category page opens. I’m not sure though, maybe there are better solutions. I need to think about it more.

Hey guys, I finally chose the simple way.

I just use the “about the French category” auto-generated topic:

I renamed the auto-generated topic and added the featured link with a rails command.

I think it will do the job!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.