3 Replies Latest reply on Nov 18, 2010 11:18 AM by Thomas Heute

    Change GateIn Banner Portlet - Best Practice

    Rich Raposa Novice

      I see at least three options for changing the Banner Portlet (and for that matter, the other portlets like the Footer Portlet) of a GateIn portal:


      1. Modify the Groovy template in web.war (/groovy/groovy/webui/component/UIBannerPortlet.gtmpl).

      2. Modify the Banner Portlet template property to point to a .gtmpl file that I create.

      3. Delete the Banner Portlet and put in my own portlet.


      I'm curious to know what other developers are doing, or if there is a Best Practice that we should be following. Option 1 above is the least desirable, but 2 and 3 seem to be decent options.




        • 1. Re: Change GateIn Banner Portlet - Best Practice
          Yuejie Chen Newbie

          Hi Raposa,


          I just start trying GateIn, I want to know how to change the Banner portlet property to my own .gtmpl? where to place the .gtmpl?

          • 2. Re: Change GateIn Banner Portlet - Best Practice
            Rich Raposa Novice

            To change the Banner Portlet properties, go into "Edit Layout" and click on the pencil icon for Banner Portlet - the first screen you see will show you the template being used. If you want to point to a different gtmpl file, you will need to put it in a .war file (or .ear) that is an extension of the default portal. You can find an example of a portal extension in the /docs/examples/portal/ directory of your install.


            You can learn more from this similar post:



            My question is more about Best Practices: is there a preferred approach for doing this? I'm guessing everyone has to change the Banner Portlet at some point in their project.

            • 3. Re: Change GateIn Banner Portlet - Best Practice
              Thomas Heute Master

              If you ask me, I would so 2 or 3 and preferably 3.


              But it also depends on the usecase. You can have a "smart" portlet that will render some banner (if you have one) depending on the page, on the site but then you need some logic in the portlet.

              Or you can make multiple portlets for multiple sites...


              If you create your own portlet you will end up with something basic that will correctly handle your needs.

              1 of 1 people found this helpful