Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Ashwin Khandelwal
Need to freeze my main menu tab on basis of type of user
17. Oktober 2011 22:26
Antwort

Ashwin Khandelwal

Rang: Junior Member

Nachrichten: 42

Eintrittsdatum: 14. Oktober 2011

Neue 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!!!!
Tejas Kanani
RE: Need to freeze my main menu tab on basis of type of user
17. Oktober 2011 22:37
Antwort

Tejas Kanani

Rang: Liferay Master

Nachrichten: 652

Eintrittsdatum: 6. Januar 2009

Neue 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
Ashwin Khandelwal
RE: Need to freeze my main menu tab on basis of type of user
17. Oktober 2011 22:59
Antwort

Ashwin Khandelwal

Rang: Junior Member

Nachrichten: 42

Eintrittsdatum: 14. Oktober 2011

Neue 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
Tejas Kanani
RE: Need to freeze my main menu tab on basis of type of user
17. Oktober 2011 23:21
Antwort

Tejas Kanani

Rang: Liferay Master

Nachrichten: 652

Eintrittsdatum: 6. Januar 2009

Neue 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
Anhänge: navigation.vm (0,9k)
Ashwin Khandelwal
How to add file attachment in web form
17. Oktober 2011 23:28
Antwort

Ashwin Khandelwal

Rang: Junior Member

Nachrichten: 42

Eintrittsdatum: 14. Oktober 2011

Neue Beiträge

Thanks tejas,


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


Thnks in Advnc!!!
Zeeshan Khan
RE: Need to freeze my main menu tab on basis of type of user
17. Oktober 2011 23:28
Antwort

Zeeshan Khan

Rang: Expert

Nachrichten: 349

Eintrittsdatum: 20. Juli 2011

Neue 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..???
Tejas Kanani
RE: How to add file attachment in web form
18. Oktober 2011 00:15
Antwort

Tejas Kanani

Rang: Liferay Master

Nachrichten: 652

Eintrittsdatum: 6. Januar 2009

Neue Beiträge

Hi Ashwin,

Please create separate thread for the same.

Thanks,
Tejas