Forum Discussion

mdwongadsk's avatar
11 years ago

Selectively showing rank icons

We have a request to have our role icons visible to anonymous users. However, some of the icons should only be visible to internal employees. We had all the icons within an <#if coreNode.permissions....
  • Claudius's avatar
    11 years ago
    Hi and welcome to the Lithium community,
    As Lithium doesn't have the concept of "public vs. private ranks" you would need to create that functionality yourself.
    At the place where you are currently wrapping the icon display into the permission check you would need to add a whitelist of ranks that expose their icon to public. Have a look at the "rank.id" method of the user FreeMarker context object: https://community.lithium.com/t5/Developers-Knowledge-Base/user-FreeMarker-context-object/ta-p/9339