Forum Discussion

Suchith's avatar
6 years ago

Restricting Custom Component Only on User Profile Page.

Hi, So far I have added a custom component in view profile page and able to view it. But I want to restrict the content only when the user views his profile and not on others user profile.  Ple...
  • Suchith's avatar
    Suchith
    6 years ago

    Hi Prasanth,

    I tried with the above condition, but got an error.

    Please let me know if you need complete stack trace.


    Updated:

    Got it!! 

    <#assign currentProfileId = page.context.user???then(page.context.user.id, user.id) />

    <#if user.id == currentProfileId >

    </#if>

    This worked.



    Thanks