Skip to main content
Solved

Subscribe button on custom pages

  • July 24, 2024
  • 11 replies
  • 170 views

alan.edwards
Forum|alt.badge.img+1

Is there any possibility of adding a subscribe button (of a category) on to a custom page that has the content on a dynamic content widget?

 

Trying to reduce click as i want users to see my custom page and have the ability to subscribe to see new content without the need to visit the underlining content page.

 

Any thoughts would be greatly appreciated.

Best answer by jvdc

Actually, I managed to create a button on custom page to subscribe users to a specific category.

Add an HTML widget and add the following piece of code in it:

<div data-view="Tooltip" class="tooltip tooltip--day forum-subscribe-button" data-mn="ItemView" data-mn-app="frontend">

  <button class="btn--toggle qa-forum-subscribe-button js-tooltip-trigger tooltip-trigger js-tooltip-trigger"

          data-component="subscribe"

          data-data='{

            "isGuest": 0,

            "url": "/subscribers/subforum/3",

            "strings": {

              "subscribed": "Unsubscribe",

              "unsubscribed": "Subscribe"

            }

          }'

          aria-haspopup="true">

    <span class="text">Subscribe</span>

    <span class="loader"></span>

  </button>

  <div class="tooltip__content tooltip__content--subscribe js-tooltip-content position--bottom">

    <i class="arrow"></i>

    When you subscribe we will email you when there is a new topic in this category

  </div>

</div>

 

  • Replace 3 with your actual category ID.

  • Example: /subscribers/subforum/7 for Category ID 7.

11 replies

Forum|alt.badge.img+3
  • Helper ⭐️⭐️⭐️
  • July 24, 2024

I don’t have a solution here, but commenting to join the thread and say I would also find this super valuable!


revote
Forum|alt.badge.img+2
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • July 25, 2024

Is there any possibility of adding a subscribe button (of a category) on to a custom page that has the content on a dynamic content widget?

I think your DCW displays content from several categories? If yes then I think I can see your point. Not all of the categories?

But, how these notifications should work? It would point to the content, not to the custom page?

My opinion, the best solution would be the option to select what categories user wants to subscribe, at one place. Example:

List of categories and every category has checkbox next to, if user wants to subscribe it.


Kenneth R
Forum|alt.badge.img+5
  • Expert ⭐️⭐️
  • July 31, 2024

Hi @alan.edwards - I’ve been doing a bit of research on this one.  It is technically possible to recreate a ‘subscribe’ button (for a community category) on a custom page but it’s not that straightforward.  If you have some development skills or a friendly developer that can help, it can be done.  While I’m not able to explain all the details (it’s too technical for me), I can give you a couple of small pointers:

  • The link for subscribing to a category looks like this: /subscribers/subforum/{categoryId}
  • You’d need to include the CSRF token in the post request (you can find that as a hidden field on the category page)

 


alan.edwards
Forum|alt.badge.img+1
  • Author
  • Contributor ⭐️⭐️⭐️
  • July 31, 2024

Thank you, i will have a play and let you know how i get on.


jvdc
Forum|alt.badge.img
  • Expert ⭐️
  • July 24, 2025

Hey I am interested in doing this too, but I am missing some information.

Basically we've “re-created” a community landing page displaying content from a community category, and I would like to display a button for users to subscribe to the community category.

Has anyone been able to do this?


jvdc
Forum|alt.badge.img
  • Expert ⭐️
  • Answer
  • July 24, 2025

Actually, I managed to create a button on custom page to subscribe users to a specific category.

Add an HTML widget and add the following piece of code in it:

<div data-view="Tooltip" class="tooltip tooltip--day forum-subscribe-button" data-mn="ItemView" data-mn-app="frontend">

  <button class="btn--toggle qa-forum-subscribe-button js-tooltip-trigger tooltip-trigger js-tooltip-trigger"

          data-component="subscribe"

          data-data='{

            "isGuest": 0,

            "url": "/subscribers/subforum/3",

            "strings": {

              "subscribed": "Unsubscribe",

              "unsubscribed": "Subscribe"

            }

          }'

          aria-haspopup="true">

    <span class="text">Subscribe</span>

    <span class="loader"></span>

  </button>

  <div class="tooltip__content tooltip__content--subscribe js-tooltip-content position--bottom">

    <i class="arrow"></i>

    When you subscribe we will email you when there is a new topic in this category

  </div>

</div>

 

  • Replace 3 with your actual category ID.

  • Example: /subscribers/subforum/7 for Category ID 7.


alan.edwards
Forum|alt.badge.img+1
  • Author
  • Contributor ⭐️⭐️⭐️
  • July 21, 2026

Hey ​@jvdc,

Does this still work for you? 

 

I am now getting errors and the button is not working, when I go to the category directly i can subscribe/unsubscribe not a problem.

 

Request URL https://community.REDACTED.com/subscribers/subforum/153

Request Method GET

Status Code 404 Not Found

Remote Address [REDACTED]:443

Referrer Policy strict-origin-when-cross-origin


jvdc
Forum|alt.badge.img
  • Expert ⭐️
  • July 22, 2026

Hey ​@alan.edwards , you're right, it doesn't work anymore.. I tried to generated a new version but did not manage…

 


jvdc
Forum|alt.badge.img
  • Expert ⭐️
  • July 22, 2026

However you could probably build a custom widget that would do this. 😁


alan.edwards
Forum|alt.badge.img+1
  • Author
  • Contributor ⭐️⭐️⭐️
  • July 22, 2026

However you could probably build a custom widget that would do this. 😁

 

That is very true, however company policy means I cant use a non-approved GitHub and cant get that passed our security team at this time (got to pick my battles).


Hi ​@alan.edwards 
You are right that code block is not doing action as Subscribe button, any idea how we can activate Subscribe button for “knowledge Base” type page