-
1. Changing Banner picture and Logo.
mvanco May 18, 2011 4:48 AM (in response to scottymac)Hi Scott,
if you want to change a picture in banner. Then it would be easier for you to use LogoPortlet instead of BannerPortlet.
Difference is that LogoPortlet points to image URL, but BannerPorltet is using groovy template.
If you don't know how to put LogoPortlet in portal layout, ask
Another way is to change/create groovy template which is for BannerPortlet placed at /gatein.ear/web.war/groovy/groovy/webui/component/UIBannerPortlet.gtmpl and logo is defined at CSS /gatein.ear/web.war//skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css
Best way for second option is to create extension with template which will override portal default template. You can have a look at this doc: http://community.jboss.org/wiki/CreateANewPortalUsingExtension how to create new extension. Templates in extension must have same path as original one (/groovy/groovy/webui/component/UIBannerPortlet.gtmpl) or you can place it anywhere and then just simply change path in BannerPortlet preferences.
If you want to change Home Page template, you should follow the same steps. Template for home page is at /gatein.ear/02portal.war/templates/groovy/webui/component/UIHomePagePortlet.gtmpl.
Hope this helps, feel free to ask on more details.
Best regards,
Michal Vančo, JBoss QE
-
2. Changing Banner picture and Logo.
scottymac May 18, 2011 9:39 AM (in response to mvanco)Thanks for the response Michal.
I was able to change the image using the LogoPortlet. Thank you so much for the direction and help.
As for the Home Page template, you mentioned
/gatein.ear/02portal.war/templates/groovy/webui/component/UIHomePagePortlet.gtmpl. As you mentioned with the banner as well, how do I change this template? Since I'm a newbie, is this all done with the runtime files (or do I need the src)? I have never used the gtmpl file and when I open the file I don't see any image lines. Also, what do you mean when you say at /gatein.ear/02portal.war? I did a search and don't see these files in the runtime but I see the gatein.ear in the src (but don't see the /templates.... Sorry for so many questions but I am just starting to work with portals (and .war(s)).
Thanks so much.
-
3. Changing Banner picture and Logo.
kamesh_sampath May 18, 2011 10:40 AM (in response to scottymac)Hi Scott,
One of the best practices is to use the GateIn portal extensions, they will allow you to override the files from the /gatein.ear/02portal.war without disturbing the original files, we will put our custom files inside the extensions to override the ones from orginal 02portal.war templates.
Please refer to the article for more details on how to do this.
Hope this helps.
Thanks.
Kamesh