Forum Discussion

mayank's avatar
12 years ago

Display Group if user is login

i want to put a check for login user...if user is login then i want to add below line otherwise not.but i dnt know how to put a check inside xml..please help...

 

 <component id="groups.widget.group-list-view"/>

4 Replies

  • Hi,
    you can't user conditional checks via Freemarker code in the XML quilt. You need to create a custom component that includes the registered vs anonymous check and the includes the widget accordingly.
  • ChiaraS's avatar
    ChiaraS
    Lithium Alumni (Retired)
    12 years ago

    Hi,

     

    you need to create a custom component for that and add the custom component to the quilt/page.

     

    You can reference standard components in the following way:

     

    <#if user.anonymous == false>
    	<@component id="groups.widget.group-list-view"/>
    </#if>

     

  • mayank's avatar
    mayank
    Ace
    12 years ago

    How to display group if user is login ang group exists??

  • Hi Mayank,
    This depend on permissions of user.
    If you grant permission to the logged in user to access the node which contains that group, and the group is public.
    then user can see that group.