Foren

Need to freeze my main menu tab on basis of type of user

thumbnail
Ashwin Khandelwal, geändert vor 12 Jahren.

Need to freeze my main menu tab on basis of type of user

Junior Member Beiträge: 42 Beitrittsdatum: 14.10.11 Neueste Beiträge
Hi,


I need to freeze some tab in main menu on basis of user log into my portal. kindly help me out with process to control menu on user basis


Thnks in Advnc!!!!
thumbnail
Tejas Kanani, geändert vor 12 Jahren.

RE: Need to freeze my main menu tab on basis of type of user

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Hi Ashwin,

You can do it by checking different user group that logged in user belongs to in theme itself.
Many services are available for the same in which you can use in vm file of theme.

And if you want to hide/show pages based on logged in user, you can also achieve it using page permission.

Thanks,
Tejas
thumbnail
Ashwin Khandelwal, geändert vor 12 Jahren.

RE: Need to freeze my main menu tab on basis of type of user

Junior Member Beiträge: 42 Beitrittsdatum: 14.10.11 Neueste Beiträge
Thnks Tejas,


But can u explain further ,process that u mentioned. i mean suppose i had two tab in my portal one "home" and other "Resource".Now what i need to do is to freeze tab "Resource" for guest and allow access to registered user.

I need to freeze particular menu tab not remove it. As it would spoil menu alignment.


Thnks
Ashwin
thumbnail
Tejas Kanani, geändert vor 12 Jahren.

RE: Need to freeze my main menu tab on basis of type of user

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Hi Ashwin,

As per your requirement I've modified navigation.vm file. Please find it attached.

In this, I've added below logic.

#if($is_signed_in)
<a href="$nav_item.getURL()" $nav_item.getTarget()><span>$nav_item.icon() $nav_item.getName()</span></a>
#else
<a href="#" $nav_item.getTarget()><span>$nav_item.icon() $nav_item.getName()</span></a>
#end

Which will create clickable link if its logged in user. So for guest it will create link with href="#"

and for fetching its sub menus, I've added condition that if user is logged in than and then fetch its sub pages.

#if ($nav_item.hasChildren() && $is_signed_in)

I hope it helps.

Thanks,
Tejas
thumbnail
Ashwin Khandelwal, geändert vor 12 Jahren.

How to add file attachment in web form

Junior Member Beiträge: 42 Beitrittsdatum: 14.10.11 Neueste Beiträge
Thanks tejas,


Tejas could you tell how to add file attachment feature in webform.


Thnks in Advnc!!!
thumbnail
Tejas Kanani, geändert vor 12 Jahren.

RE: How to add file attachment in web form

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Hi Ashwin,

Please create separate thread for the same.

Thanks,
Tejas
thumbnail
Zeeshan Khan, geändert vor 12 Jahren.

RE: Need to freeze my main menu tab on basis of type of user

Expert Beiträge: 349 Beitrittsdatum: 21.07.11 Neueste Beiträge
thnx Tejas !!!

i have one requirement Tejas......after adding this line <aui:input name="file" type="file" /> in the WEBFORM jsp file, i am able to see the field of attaching the document but the problem is when i click the SEND button, everything is coming in my gmail inbox except the attached document.......how to solve this..???