4 Replies Latest reply on May 19, 2006 7:50 AM by suniil

    changing text in browser-tab

    dhexus

      hi,

      im looking for a way to change the text appearing in the browser tab and in the system
      panel respectively. i am using jboss as 4.0.4-RC1 and jboss portal 2.2.1-RC2. the current entry "JBoss Portal 2.2.1-RC2" is a little bit technical.

      .. still not finding the relevant file - what is the relevant file? thanks in advance,

      dhexus

        • 1. Re: changing text in browser-tab
          noicangi

          that's part of the layout of the portal ;) in your portal instance.war add the file portal-layouts.xml with this:

          <?xml version="1.0" encoding="UTF-8"?>


          your name
          /layouts/index.jsp
          /layouts/maximized.jsp









          and in the war file copy a dir called layouts/index.jsp with the index.jsp containing this:


          %@ page import="org.jboss.portal.server.PortalConstants"%>
          <%@ taglib uri="/WEB-INF/theme/portal-layout.tld" prefix="p" %>
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





          HERE YOUR TITLE FOR BROWSER



          <meta http-equiv="Content-Type" content="text/html;"/>
          <!-- to correct the unsightly Flash of Unstyled Content. -->

          <!-- inject the theme; default to the Nphalanx theme if nothing is selected for the portal or the page -->
          <p:theme themeName='Nphalanx'/>
          <!-- insert header content that was possibly set by portlets on the page -->
          <p:headerContent/>











          <p:region regionName='navigation' regionID='navigation'/>





          <!-- insert the content of the 'left' region of the page, and assign the css selector id 'regionA' -->
          <p:region regionName='left' regionID='regionA'/>
          <!-- insert the content of the 'center' region of the page, and assign the css selector id 'regionB' -->
          <p:region regionName='center' regionID='regionB'/>


          Powered by Vianauta







          • 2. Re: changing text in browser-tab
            noicangi

            sorry its looks awfull again:

            in hte directory web-inf of your war portal instance create a directory callae portal-layout.xml with this:

            <?xml version="1.0" encoding="UTF-8"?>
            <layouts>
             <layout>
             <name>myLAYOUT</name>
             <uri>/layouts/index.jsp</uri>
             <uri state="maximized">/layouts/maximized.jsp</uri>
             <regions>
             <region name="left"/>
             <region name="center"/>
             <region name="navigation"/>
             </regions>
             </layout>
            </layouts>


            then in the war file create the dir /layouts/index.jsp with this code:

            <%@ page import="org.jboss.portal.server.PortalConstants"%>
            <%@ taglib uri="/WEB-INF/theme/portal-layout.tld" prefix="p" %>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            
            
             <title>YOUR TITLE</title>
            
            
             <meta http-equiv="Content-Type" content="text/html;"/>
             <!-- to correct the unsightly Flash of Unstyled Content. -->
             <script type="text/javascript"></script>
             <!-- inject the theme; default to the Nphalanx theme if nothing is selected for the portal or the page -->
             <p:theme themeName='Nphalanx'/>
             <!-- insert header content that was possibly set by portlets on the page -->
             <p:headerContent/>
            
            </head>
            
            <body id="body">
            <div id="portal-container">
             <div id="sizer">
             <div id="expander">
             <div id="logoName"></div>
             <table border="0" cellpadding="0" cellspacing="0" id="header-container">
             <tr>
             <td align="center" valign="top" id="header">
             <p:region regionName='navigation' regionID='navigation'/>
             <div id="spacer"></div>
             </td>
             </tr>
             </table>
             <div id="content-container">
             <!-- insert the content of the 'left' region of the page, and assign the css selector id 'regionA' -->
             <p:region regionName='left' regionID='regionA'/>
             <!-- insert the content of the 'center' region of the page, and assign the css selector id 'regionB' -->
             <p:region regionName='center' regionID='regionB'/>
             <hr class="cleaner"/>
            
             <div id="footer-container" class="portal-copyright">Powered by <a class="portal-copyright"
             href="http://www.vianauta.com">Vianauta</a><br/>
             <span id="Tema por"></span>
             </div>
             </div>
             </div>
             </div>
            </div>
            </body>
            </html>


            • 3. Re: changing text in browser-tab
              dhexus

              thank you for your fast and detailed contribution! you all make this forum great!
              although my solution looks quite different, you gave me the idea to change

              $PORTAL_HOME/core/src/bin/portal-core-war/layouts/generic/index.jsp

              in the following way:

              <title>MY TEXT</title>
               <!-- <title><%= PortalConstants.VERSION.toString() %></title> -->


              dhexus

              • 4. Re: changing text in browser-tab
                suniil

                many thanks NOICANGI. very good tip