<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How add js scripts to head tag in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-add-js-scripts-to-head-tag/m-p/323718#M10719</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You have several options, some of them are only available in recent versions of Nuxeo.&lt;/P&gt;
&lt;P&gt;If you'd like to do this just for a few pages, you can insert links in the xhtml template using a slot that was made available since 5.4.2:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;ui:define name="header_scripts"&amp;gt;
  &amp;lt;script type="text/javascript" src="#{baseURL}scripts/jquery/jquery.hotkeys.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/ui:define&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://jira.nuxeo.com/browse/NXP-6551"&gt;https://jira.nuxeo.com/browse/NXP-6551&lt;/A&gt; for details.&lt;/P&gt;
&lt;P&gt;When using earlier versions, you can also contribute your resources to the theme view fragments (if you'd like the scripts to be available on all pages), for instance by adding your resources to the "nuxeo5 includes" fragment used in the Nuxeo default theme:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;component name="org.nuxeo.theme.myCustomContrib"&amp;gt;
  &amp;lt;require&amp;gt;org.nuxeo.theme.nuxeo.default&amp;lt;/require&amp;gt;
  &amp;lt;extension target="org.nuxeo.theme.services.ThemeService" point="views"&amp;gt;
    &amp;lt;view name="nuxeo5 includes" template-engine="jsf-facelets" merge="true"&amp;gt;
      &amp;lt;resource&amp;gt;jquery.hotkeys.js&amp;lt;/resource&amp;gt;
    &amp;lt;/view&amp;gt;
  &amp;lt;/extension&amp;gt;
  &amp;lt;extension target="org.nuxeo.theme.services.ThemeService" point="resources"&amp;gt;
    &amp;lt;resource name="jquery.hotkeys.js"&amp;gt;
      &amp;lt;path&amp;gt;scripts/jquery/jquery.hotkeys.js&amp;lt;/path&amp;gt;
    &amp;lt;/resource&amp;gt;
  &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You do not have to name the resource like the file, but keeping the extension ".js" is important.&lt;/P&gt;
&lt;P&gt;If you only have some custom JS functions to add to all pages, you can also override the file at nuxeo.war/scripts/custom-javascript.js that is an empty placeholder in the default application.&lt;/P&gt;
&lt;P&gt;Note that we're currently making improvements to make theme resources management more modular (see &lt;A href="https://jira.nuxeo.com/browse/NXP-7520"&gt;https://jira.nuxeo.com/browse/NXP-7520&lt;/A&gt;), so we'll probably advertise new ways of doing so from the 5.5. version (but options i gave above will be kept for compatibility).&lt;/P&gt;
&lt;P&gt;Update since 5.5 release: see documentation available at &lt;A href="http://doc.nuxeo.com/x/N4AO"&gt;http://doc.nuxeo.com/x/N4AO&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2011 11:01:48 GMT</pubDate>
    <dc:creator>Anahide_Tchertc</dc:creator>
    <dc:date>2011-10-31T11:01:48Z</dc:date>
    <item>
      <title>How add js scripts to head tag</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-add-js-scripts-to-head-tag/m-p/323717#M10718</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;We are trying to integrate &lt;A href="http://www.simile-widgets.org/exhibit/"&gt;Exhibit&lt;/A&gt; to a Nuxeo application.&lt;/P&gt;
&lt;P&gt;Unfortunately, they need to add some scripts and other things exactly to the head tag of the HTML document.&lt;/P&gt;
&lt;P&gt;Can you, please, give some info how this can be done. We don't need this for all pages - just for a few.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2011 22:57:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-add-js-scripts-to-head-tag/m-p/323717#M10718</guid>
      <dc:creator>jana01_</dc:creator>
      <dc:date>2011-10-28T22:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How add js scripts to head tag</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-add-js-scripts-to-head-tag/m-p/323718#M10719</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You have several options, some of them are only available in recent versions of Nuxeo.&lt;/P&gt;
&lt;P&gt;If you'd like to do this just for a few pages, you can insert links in the xhtml template using a slot that was made available since 5.4.2:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;ui:define name="header_scripts"&amp;gt;
  &amp;lt;script type="text/javascript" src="#{baseURL}scripts/jquery/jquery.hotkeys.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/ui:define&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See &lt;A href="https://jira.nuxeo.com/browse/NXP-6551"&gt;https://jira.nuxeo.com/browse/NXP-6551&lt;/A&gt; for details.&lt;/P&gt;
&lt;P&gt;When using earlier versions, you can also contribute your resources to the theme view fragments (if you'd like the scripts to be available on all pages), for instance by adding your resources to the "nuxeo5 includes" fragment used in the Nuxeo default theme:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;component name="org.nuxeo.theme.myCustomContrib"&amp;gt;
  &amp;lt;require&amp;gt;org.nuxeo.theme.nuxeo.default&amp;lt;/require&amp;gt;
  &amp;lt;extension target="org.nuxeo.theme.services.ThemeService" point="views"&amp;gt;
    &amp;lt;view name="nuxeo5 includes" template-engine="jsf-facelets" merge="true"&amp;gt;
      &amp;lt;resource&amp;gt;jquery.hotkeys.js&amp;lt;/resource&amp;gt;
    &amp;lt;/view&amp;gt;
  &amp;lt;/extension&amp;gt;
  &amp;lt;extension target="org.nuxeo.theme.services.ThemeService" point="resources"&amp;gt;
    &amp;lt;resource name="jquery.hotkeys.js"&amp;gt;
      &amp;lt;path&amp;gt;scripts/jquery/jquery.hotkeys.js&amp;lt;/path&amp;gt;
    &amp;lt;/resource&amp;gt;
  &amp;lt;/extension&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You do not have to name the resource like the file, but keeping the extension ".js" is important.&lt;/P&gt;
&lt;P&gt;If you only have some custom JS functions to add to all pages, you can also override the file at nuxeo.war/scripts/custom-javascript.js that is an empty placeholder in the default application.&lt;/P&gt;
&lt;P&gt;Note that we're currently making improvements to make theme resources management more modular (see &lt;A href="https://jira.nuxeo.com/browse/NXP-7520"&gt;https://jira.nuxeo.com/browse/NXP-7520&lt;/A&gt;), so we'll probably advertise new ways of doing so from the 5.5. version (but options i gave above will be kept for compatibility).&lt;/P&gt;
&lt;P&gt;Update since 5.5 release: see documentation available at &lt;A href="http://doc.nuxeo.com/x/N4AO"&gt;http://doc.nuxeo.com/x/N4AO&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2011 11:01:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-add-js-scripts-to-head-tag/m-p/323718#M10719</guid>
      <dc:creator>Anahide_Tchertc</dc:creator>
      <dc:date>2011-10-31T11:01:48Z</dc:date>
    </item>
  </channel>
</rss>

