kentgilliam
12 years agoMentor
Need to generate conditional homepage
We have a current community for one product group but a new product group is buidling another community on our instance. For the most part I am able to separate the two but the Community Browser only links to the main community homepage. I'd like to be able to manage the content for each product group's homepage on a category page and then use a conditional to render the entire content of a page based on role.
The conditional would look something like this:
<#assign user_has_role = false /> <#if user.registered > <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role> <#if role.name?? && (role.name == "BBCRM")> <#assign user_has_role = true /> </#if> </#list> </#if> <#if user_has_role > This would be code that would generate all of the content under category 1 URL <#else> This would be code that would generate all of the content under category 2 URL </#if>
I've looked through Freemarker options and REST API options but I can't figure out anything that works. Is it even possible to bring in the content of a page without using <iframe>? Please tell me there is a way.
Thanks!
Kent