cancel
Showing results for 
Search instead for 
Did you mean: 

Attn: Share template and component authors

mikeh
Star Contributor
Star Contributor
[size=120]Please note the important change in r13114 to support client-side JavaScript being minimised via the YUI Compressor.[/size]

[size=120]Components[/size]
Old:
<!– Document List Assets –>
<link rel="stylesheet" type="text/css" href="${page.url.context}/components/documentlibrary/documentlist.css" />
<script type="text/javascript" src="${page.url.context}/components/documentlibrary/documentlist.js"></script>
New:
<#include "../component.head.inc">
<!– Document List –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/components/documentlibrary/documentlist.css" />
<@script type="text/javascript" src="${page.url.context}/components/documentlibrary/documentlist.js"></@script>

[size=120]Templates[/size]
Old:
<#import "import/alfresco-template.ftl" as template />
<@template.header>
   <link … />
   <script … ></script>

<@template.body>

<@template.footer>
New:
<#include "include/alfresco-template.ftl" />
<@templateHeader>
   <@link … />
   <@script … ></@script>

<@templateBody>

<@templateFooter>

Finally, the debug flag is now in config rather than the alfresco_template.ftl; you'll find it in web-framework-config-application.xml

Thanks,
Mike
2 REPLIES 2

mycroes
Champ in-the-making
Champ in-the-making
[size=120]Please note the important change in r13114 to support client-side JavaScript being minimised via the YUI Compressor.[/size]

[size=120]Components[/size]
Old:
<!– Document List Assets –>
<link rel="stylesheet" type="text/css" href="${page.url.context}/components/documentlibrary/documentlist.css" />
<script type="text/javascript" src="${page.url.context}/components/documentlibrary/documentlist.js"></script>
New:
<#include "../component.head.inc">
<!– Document List –>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/components/documentlibrary/documentlist.css" />
<@script type="text/javascript" src="${page.url.context}/components/documentlibrary/documentlist.js"></@script>
I would also like to mention that the old style still works, so you can develop your script without having to minimize it (or pretending to have done so).
Regards,

Michael

mikeh
Star Contributor
Star Contributor
I would also like to mention that the old style still works, so you can develop your script without having to minimize it (or pretending to have done so).
Regards,

Michael
Yes, good point. Although with the caveat that we now group stylesheets into @import directives in order to workaround an MSIE limitation. You might hit the issue if you don't use the new format.

Thanks,
Mike