Forum Discussion

saarah's avatar
saarah
Adept
7 years ago

Board subscription option

We want people to really easily see the Subscribe option. Is there any way to take out the subscribe button outside the dropdown.

  • saarah

    Ohh you are using it in js. It would not be possible to use restadmin in js.  In this scenario, you have to make a call to the endpoint. Where you can use the restadmin call like this

    <#assign subscribe = restadmin("/boards/id/${board_id}/subscriptions/users/self/add?subscription.type=email") />

     

  • saarah

    Yes, you can do it. 

    There are some ways you can use to get it done
    a) Use lithium OOTB component. Here is the component

    <@component id="subscriptions.action.add-message-user-email"/>

    b) Create it custom using lithium subscription APIs

    • saarah's avatar
      saarah
      Adept

      VikasB My bad! It returns

      RenderQueueException:Render queue error in SetupRender[subscriptions/contributions/MessageActions:addmessageuseremailsubscription]: Failure reading parameter 'isVisible' of component subscriptions/contributions/MessageActions:addmessageuseremailsubscription$isvisible: No object of type lithium.web2.data.entity.PrimaryRenderContextEntity is available from the Environment.