RyanMcClelland - I have made some updates in the code to get the Case Portal Page if a user has a certain role.
Code:
<#elseif role.name?lower_case == "First_ROLE_NAME" || role.name?lower_case == "Second_ROLE_NAME">
<#assign postUrl = "/t5/crmsupport/page" />
Updated Code:
<#include "theme-lib.common-functions.ftl" />
<#assign postUrl = "" />
<#switch page.name>
<#case "CategoryPage">
<#assign postUrl = webuisupport.urls.page.name.PostPage.path("category-id",coreNode.id).path("choose-node","true") />
<#break>
<#case "ForumPage">
<#case "ForumTopicPage">
<#assign postUrl = webuisupport.urls.page.name.PostPage.path("board-id",coreNode.id) />
<#break />
<#default>
<#assign postUrl = webuisupport.urls.page.name.PostPage.path("choose-node","true") />
<#break />
</#switch>
<#if postUrl?? && postUrl?has_content>
<#attempt>
<#assign rolesQuery = "select * from roles where users.id = '${user.id?c}'"/>
<#assign rolesList = executeLiQLQuery(rolesQuery, false, true) />
<#list rolesList as role>
<#if role.name?lower_case == "direct">
<#assign postUrl = postUrl.path("product-id","Direct")/>
<#elseif role.name?lower_case == "office">
<#assign postUrl = postUrl.path("product-id","Office")/>
<#elseif role.name?lower_case == "First_ROLE_NAME" || role.name?lower_case == "Second_ROLE_NAME">
<#assign postUrl = "/t5/crmsupport/page" />
</#if>
</#list>
<#recover>
</#attempt>
</#if>
<#assign postUrl = postUrl.build() />
<#if postUrl != "">
<div class="post-btn-wrapper lia-button-wrapper">
<a href="${postUrl}" class="post-btn lia-button lia-button-primary">${text.format("menubar.button.new_message")}</a>
</div>
</#if>
Please let me know if this works for you.
Thanks!