Foros de discusión

How to read a properties file in vm file

Bapun Verma, modificado hace 10 años.

How to read a properties file in vm file

New Member Mensaje: 1 Fecha de incorporación: 17/09/13 Mensajes recientes
hii,

can anyone help me out??I want to read a properties file in navigation.vm file of my custom theme..can anyone give me some suggestion??

Regards,
Bapun
thumbnail
Ahmed Hasan, modificado hace 10 años.

RE: How to read a properties file in vm file

Expert Mensajes: 306 Fecha de incorporación: 13/04/07 Mensajes recientes
Dear Bapun,

Why don't you make use of "custom settings" in the theme's look-and-feel.xml and read that in our VM file. This will be much cleaner approach than reading from an external properties file.

You can refer to these links to know how to make use of them. It is quite cool and powerful.

https://www.liferay.com/web/raymond.auge/blog/-/blogs/theme-settings-and-new-advanced-controls

https://www.liferay.com/community/forums/-/message_boards/message/14381401

Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook
Ashok BS, modificado hace 10 años.

RE: How to read a properties file in vm file

Junior Member Mensajes: 30 Fecha de incorporación: 26/08/13 Mensajes recientes
Hi, can anyone help me with this??

I am trying to have a dropdown in navigation.vm, so my requirement is to read the dropdown values from external properties file? How to achieve it??Please provide me some sample codes if possible.This is urgent,please help me.
thumbnail
Jaynil A Bagdai, modificado hace 10 años.

RE: How to read a properties file in vm file

Regular Member Mensajes: 119 Fecha de incorporación: 3/03/12 Mensajes recientes
Hi Bapun,

You can check messages over this thread.

https://www.liferay.com/community/forums/-/message_boards/message/5429779

--
Jaynil