Custom menu links are modified and broken by Discourse

This commit should allow arbitrary query parameters to be included in sidebar links:

There are still a couple of quirks which are more general than the sidebar:

  1. As discussed above, if the query parameter is intended to trigger something in a third-party JS library, they will need to have support for Single Page Apps (SPAs)

  2. Ember (our JS framework) currently strips any unrecognized query parameters immediately after navigation. So, even though the sidebar link includes the query param, it may disappear as soon as you navigate.

    We are keeping an eye on potential future solutions to this in the Ember framework :eyes:

In the meantime, one workaround for both those problems would be to make the link to some external site, which then redirects back to your forum. (e.g. a URL shortening service)

4 Likes