Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Lambert Mickael
Get all pages from one organisation
July 25, 2012 1:47 AM
Answer

Lambert Mickael

Rank: Junior Member

Posts: 58

Join Date: December 29, 2011

Recent Posts

Hello everyone!

I just wanted to know if it's possible to get all the pages from one organisaion in a velocity page ?

Indeed, i've modified the portal_normal.vm file and i want to create a dynamic menu wich display links according to organisation's pages.

I really need help please.

Thank you!
Pinkesh Gandhi
RE: Get all pages from one organisation
July 24, 2012 2:55 AM
Answer

Pinkesh Gandhi

Rank: Regular Member

Posts: 100

Join Date: January 26, 2012

Recent Posts

Hi Lambert,

Yes you can do it from velocity templates.

You can use LayoutLocalService inside velocity template to get all layouts from particular organization/community.
And to get the object of LayoutLocalService in velocity template, you can use following line

1
2#set($layoutLocalService  = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))


I hope this may helps you.

Let me know if you have any query.
Jignesh Vachhani
RE: Get all pages from one organisation
July 24, 2012 3:01 AM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

you can re-use the code from this blog
Hope you don't need to make more effort for the same.
Lambert Mickael
RE: Get all pages from one organisation
July 24, 2012 3:09 AM
Answer

Lambert Mickael

Rank: Junior Member

Posts: 58

Join Date: December 29, 2011

Recent Posts

Thank you both of you for the quick answer, i'll try this and tell you if it works!

Really, thanks! emoticon
Lambert Mickael
RE: Get all pages from one organisation
July 25, 2012 1:04 AM
Answer

Lambert Mickael

Rank: Junior Member

Posts: 58

Join Date: December 29, 2011

Recent Posts

Hello everyone !

Your solution work really fine. Thank you very much for your help emoticon

Have a good day, and again, thank you !!
Jignesh Vachhani
RE: Get all pages from one organisation
July 25, 2012 1:07 AM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

That's nice lambert.
You can change status to answered which would help to community members to find solution easily.