6 Replies Latest reply on Jul 24, 2009 5:13 PM by Kelly Chi

    Creating a theme

    Kelly Chi Newbie

      Hey all, I've attempted to create a theme based on information found here:


      But I can't see any effects..
      Instead, for some reason, all the themes in the dropdown list are now appearing twice??

      I'm using 2.7.2

      This is what I've done:

      1) Created a war file with these contents:
      - portal_style.css

      - images (directory)
      --- images.jpg etcetc etc

      - WEB-INF (directory)

      My web.xml file is completely blank.
      Inside "portal-themes.xml", I have it just like it shows in the customportal.pdf (from http://www.jboss.org/community/wiki/CustomPortal

      I uploaded this war file into the /deploy directory.
      Is this theme supposed to appear in the dropdown list?
      Would someone be able to tell me what I'm doing wrong?

      Thanks so much!

        • 1. Re: Creating a theme
          vineet tripathi Newbie

          The obvious reason that i can see here is:

          JBoss portal ThemeService will show all the themes as available themes that you have mentioned in your portal-themes.xml.

          So, I guess you are having same entries in 2 different portal-themes.xml, placed in 2 different application in your deploy directroy(One could be the JBOSS-portal.sar/portal-core.war and the other is your custom one). Give different names in your portal-themes.xml, for your custom themes.

          • 2. Re: Creating a theme
            Kelly Chi Newbie

            Hello, thanks for the response!

            Inside my custom portal-themes.xml (inside the war), I only have this:

             <link rel="stylesheet" id="main_css" href="/portal_style.css" type="text/css"/>
             <link rel="shortcut icon" href="/images/favicon.ico"/>

            So I'm not sure where the double entries are coming from.... =/
            Also, only "maple" "industrial" "renewal" and "renaissance" are appearing twice on the list.. "default" is still the same.
            The name of my custom theme isn't appearing at all..

            • 3. Re: Creating a theme
              Kelly Chi Newbie

              Also, I had previously tried creating a directory inside
              that contained images folder and a stylesheet

              and adding defining the theme inside "jboss-portal.sar/portal-core.war/WEB-INF/portal-themes.xml"

              but this appeared to create no results either

              • 4. Re: Creating a theme
                Peter Johnson Master

                I'll assume you already tried restarting the app server. So try this: stop the app server, move your theme war file to the server/xxx/deploy/jboss-portal.sar directory. Then start the app server.

                If that doesn't work, go into the server/xxx/deploy/jboss-portal.sar/conf/data/default-object.xml file and change the theme.id property value to your theme and restart the app server.

                • 5. Re: Creating a theme
                  Peter Johnson Master

                  Looks like you were typing the same time I was. I'm really surprised that editing the global portal-themes.xml did not do anything, especially since that is where the themes that ship with the portal are declared. (Oh, you are restarting the app server after each of these changes, right?)

                  • 6. Re: Creating a theme
                    Kelly Chi Newbie

                    IT WORKS! :)

                    Changed around a few things, restarted and now the theme is showing up :) Thank you!