[opencms-dev] naming style and headerincludes

Jonathan Plettenberg jonathan.plettenberg at componio.net
Wed Jan 21 15:46:33 CET 2015


Hello Christoph,

not shure if this helps you regarding the <cms:headinclude>


When you put these tags in your template (in the <html><head> section)

<cms:headincludes type="javascript" />
<cms:headincludes type="css" />

the javascript-files and/or css-files, which are defined in the <headincludes> - Section of your content.xsd definition, are imported at this point.

These files are dynamically imported, that means only when the corresponding container-element is used on the current page.

Regards 
Jonathan
-- 
componio GmbH 
Robert-Bosch-Straße 7 
D - 64293  Darmstadt 
Tel:    +49.6151.500.367.15 
Office:    +49.6151.500.367.0 
Fax:    +49.6151.500.367.6 
Internet: http://www.componio.net 
Twitter: http://www.twitter.com/componio 
E-Mail: componio at componio.net 
Geschäftsführer: Fabian Huschka 
HRB 9624 - Registergericht Amtsgericht Darmstadt

-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Christoph Kukulies
Gesendet: Dienstag, 20. Januar 2015 18:54
An: The OpenCms mailing list
Betreff: [opencms-dev] naming style and headerincludes


I'm glancing through the 9.5.0 documentation. Formerly I had named all my jsps without the extension .jsp.
Can I stay with this style or is the explicit extension .jsp recommended?

I'm also  stumbling across the term "headerincludes".

My former websites' main templates had a structure like this:

<%@page import="org.opencms.jsp.*,org.opencms.file.*,java.util.*" %> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<cms:template element="head" >
      <cms:include file="../elements/head" element="head"/> </cms:template>

<cms:template element="titel" >
       <cms:include element="titel"/>
</cms:template>
<cms:template element="body">
          ...various div elements...
           <cms:include element="inhalt"/>
           </cms:template>

<cms:template element="foot" >
<cms:include file="../elements/foot" element="foot" /> </cms:template>

In ../elements I had head,foot jsps etc.
also
../pages (contact page, forms)
../resources
../styles (css)


How does this scheme translate into the 9.5.0 way doing things?
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de _______________________________________________
This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev






More information about the opencms-dev mailing list