[opencms-dev] Editor Styles per Site not Template

Andreas Zahner a.zahner at alkacon.com
Tue Mar 23 16:37:59 CET 2010


Rainer,

therefore you have to implement the interface 
org.opencms.workplace.editors.I_CmsEditorCssHandler. In the method 
getUriStyleSheet you get the path to the edited resource as argument.

You can have a look at the default implementation 
CmsEditorCssHandlerDefault in the same package as an example.

Additionally, you have to add your handler in the opencms-workplace.xml 
configuration file:
<editorcsshandlers>
   <editorcsshandler class="${YOUR_HANDLER_CLASS}"/>
   <editorcsshandler 
class="org.opencms.workplace.editors.CmsEditorCssHandlerDefault"/>
</editorcsshandlers>

The order is important as the handlers are triggered in the order they 
are specified in the configuration file. The first handler that 
"matches" is used by the editor.

-- 
Regards,
Andreas.

-------------------
Andreas Zahner

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com -  http://www.opencms.org

Rainer Reichel schrieb:
> Hi list,
> 
> we use the same template -as usual- for a couple of sites.
> As each site can include individual CSS files within the template 
> we also want to reflect these in the FCK CSS assignment.
> With the template property we can assign a single CSS file for FCK
> only. The first thought was to create siblings of the template
> for each site to assign a unique FCK CSS file. The more elegant
> way seems to assign this single CSS as a JSP and let it include 
> additional CSS files from each site. 
> Now the question is how can I identify the edited resource
> in my CSS JSP. What I see is that it's integrated in the
> frame and iframe structure of workplace without any parameters.
> 
> Kind regards
> 
> Rainer
> 
> 
> 



More information about the opencms-dev mailing list