3 Replies Latest reply on May 18, 2011 10:40 AM by Kamesh Sampath

    Changing Banner picture and Logo.


      Hi GateIn community,


      How do you change the banner portlet to include a different picture?  I've searched the topics (and the provided docs), found a few but none actually tell me how to do it?  I tried to select the portlet, point the url to a jpg that is in the /eXoResources/skin/sharedImages directory (I can bring it up in a browser), and save.  When I view the page, it still has the GateIn banner and not my new jpg.  Also, there is an '*' when I select the pencil to enter my URL.  Does this mean this "template" can not be changed? I looked through the runtime code looking for where the .gif or .png is defined and can't seem to find it.  Do I need to compile a module from the src files?  If so, how do I do this?  If not, please point me in the direction of using the install files. 


      Also, when you first bring up the GateIn portal, how do you change that 'GateIn Portal - The best of eXo etc...' picture?  (I'm guessing its the same way as the banner pictures, no?)


      Thanks in advance for any help you might have...

        • 1. Changing Banner picture and Logo.
          Michal Vanco Newbie

          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.

            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 Newbie

              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.