Fórumok

Need to extend the logo upload to allow multiple logos [RESOLVED]

Rohit Jain, módosítva 15 év-val korábban

Need to extend the logo upload to allow multiple logos [RESOLVED]

New Member Bejegyzések: 14 Csatlakozás dátuma: 2008.04.22. Legújabb bejegyzések
We have multiple logos that need to be displayed in the top of every page. One logo on the left and the other on the right of the banner. Currently I can upload only one image from the logo tab in the community settings and only access the company_logo velocity variable. How can I upload more than one and define a custom velocity variable for the new image and use the custom velocity variable in the portal_normal.vm.
thumbnail
David Truong, módosítva 15 év-val korábban

RE: Need to extend the logo upload to allow multiple logos

Expert Bejegyzések: 322 Csatlakozás dátuma: 2005.03.24. Legújabb bejegyzések
Multiple ways to do so.. but probably the easiest way would be to set the logo you want in the ServicePreAction and then grab it from the request since you need to change it for every page or you can just do the logic in the init_custom.vm if you already have all the the java objects you need in the templates.
Rohit Jain, módosítva 15 év-val korábban

RE: Need to extend the logo upload to allow multiple logos

New Member Bejegyzések: 14 Csatlakozás dátuma: 2008.04.22. Legújabb bejegyzések
Thanks for the reply. The scenario we have is that these logos will be managed by the users with content manager priveleges, and thus the problem is that the user interface of the liferay portal only allows to upload one logo and internally only creates one velocity variable company_logo.

So is there a way to some how extend the upload logo functionality and have custom logos or banner images in custom velocity variables and then use them in portal_normal.vm to define the layout and position of those images in the banner.
thumbnail
David Truong, módosítva 15 év-val korábban

RE: Need to extend the logo upload to allow multiple logos

Expert Bejegyzések: 322 Csatlakozás dátuma: 2005.03.24. Legújabb bejegyzések
Rohit Jain:
Thanks for the reply. The scenario we have is that these logos will be managed by the users with content manager priveleges, and thus the problem is that the user interface of the liferay portal only allows to upload one logo and internally only creates one velocity variable company_logo.

So is there a way to some how extend the upload logo functionality and have custom logos or banner images in custom velocity variables and then use them in portal_normal.vm to define the layout and position of those images in the banner.


Sure.. if you want minimum coding..

Here are some options (easiest to hardest):

1) Each layout allows you to upload an icon under page settings. Instead of displaying the normal logo display the layout icon.

2) I would leverage the CMS or Document Library and have them upload their pictures in some sort of structured way so that you can programmatically grab the appropriate one when you are in the ServicePreAction and set it to the request.

3) manually override the company logo functions of liferay to allow for more than 1 logo (I actually think this is a very bad solution).
Rohit Jain, módosítva 15 év-val korábban

RE: Need to extend the logo upload to allow multiple logos (Resolved)

New Member Bejegyzések: 14 Csatlakozás dátuma: 2008.04.22. Legújabb bejegyzések
Thanks a lot !!!