Layouts and Themes are (currently) being deployed as part of a war file (which 
can optionally be contained in an ear). 
I said currently because we are looking into getting themes to be deployable 
via Content Management for JBP 2.4.

A layout consists of one or more JSP or Servlets , and a layout descriptor. 
These jsps and servlets underly the same restrictions as any other jsp or 
servlet in a war file. The layout descriptor defines the uri (relative to the 
local servlet context) of the jsp or servlet that the portal's request 
dispatcher can use to include the jsp or servlet. 

The layout descriptor has to reside in the /WEB-INF/ folder , and has to be 
named portal-layouts.xml 

Themes are even simpler. Since themes consist of nothing but static resources 
(css, img, jpeg, etc.) , all that is needed is a theme descriptor that tells 
the portal what link and script tags need to be injected for the particular 
theme. 
The theme descriptor needs to reside in /WEB-INF/ and needs to be named 
portal-layouts.xml . Theme resources are declared, again just like layout jsps 
and servlets, relative to the containing servlet context. 

here is an example layout war layout :) :


  | /root
  |        /jsp
  |             /layout.jsp
  |        /WEB-INF 
  |                     /web.xml
  |                     /portal-layouts.xml
  | 
  | 

and here is the content of the desriptor: 


  | <?xml version="1.0" encoding="UTF-8"?>
  | <layouts>
  |    <layout>
  |       <name>foo</name>
  |       <uri>/jsp/layout.jsp</uri>
  |       <regions>
  |          <region name="left"/>
  |          <region name="center"/>
  |       </regions>
  |    </layout>
  | </layouts>
  | 

Note: the layout does not need the web.xml, but to form a valid WAR you need to 
pack one.

here is an example theme war :


  | /root
  |        /themeFoo
  |             /img
  |                   /lots-of-images-here.jpg
  |             theme.css
  |        /WEB-INF 
  |                     /web.xml
  |                     /portal-themes.xml
  | 

and here is the content of the desriptor: 


  | <?xml version="1.0" encoding="UTF-8"?>
  | <themes>
  |    <theme>
  |       <name>foo</name>
  |        <link rel="stylesheet" id="main_css" href="/themeFoo/theme.css" 
type="text/css" />
  |        <link rel="shortcut icon" href="/themeFoo/img/favicon.ico" />
  |    </theme>
  | </themes>
  | 

Note: you can pack as many themes and layouts into the same war, as long as you 
give them a unique name in the scope of the war. Yes, you can mix themes and 
layouts in the same war.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909853#3909853

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909853


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to