I’m trying to add routes to one of the plugins I’m using (Discourse Tab Bar) and I couldn’t find anything relevant or easy to understand for me by searching the meta.
I’m trying to identify the route name that leads to for example:
I know that I can use either a predefined route name or a relative URL. Here is the question:
How can i find the list of all the predefined routes? (if there even is such a list)
How can I use a relative URL when the URL contains the username in the URL (or other dynamic text like groups names)? For example for URLs that in the Preferences panel.
This one I know. You can swop out
my to create a generic link.
Thank you @JammyDodger, that helped a lot.
LE: I’m still looking for an answer regarding the routes cause it seems that for the theme I’m using https://meta.discourse.org/t/discourse-tab-bar-for-mobile/ using the relative URL the active button is not changing its color like it’s suppose to.
I am also using Discourse Tab Bar and Follow plugin. I also added the
/my/follow/feed url to Discourse Tab Bar. The tab activation didn’t work on my forum too Now I made a little css hack to make this work.
I target the current body class which is
.user-follow-page this help us to keep the css modification on follow page. With this class we can easily target the relevant Discourse Tab Bar tab.
What we have to do is change the stucked active tab color to the default (non active) and add the active tab color to that tab which has the
data-destination is the url you set up in the Tab Bar theme component to tabs.
Add this to a new component mobile css section.
I believe this is it discourse/app-route-map.js at 9d5da2b383765becb824a8f3ff3665abc8e527fa · discourse/discourse · GitHub
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.