<?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 How to get context in javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254691#M207821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi! I want to get the alfresco share context ([server]:9080/share) in one javascript function of my custom dashlet (not the .get.js)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea?? Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jan 2011 20:26:23 GMT</pubDate>
    <dc:creator>andrewriver</dc:creator>
    <dc:date>2011-01-31T20:26:23Z</dc:date>
    <item>
      <title>How to get context in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254691#M207821</link>
      <description>Hi! I want to get the alfresco share context ([server]:9080/share) in one javascript function of my custom dashlet (not the .get.js)Any idea?? Thanks</description>
      <pubDate>Mon, 31 Jan 2011 20:26:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254691#M207821</guid>
      <dc:creator>andrewriver</dc:creator>
      <dc:date>2011-01-31T20:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get context in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254692#M207822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are asking about how to get the context path directly from JavaScript (in the client), I do not think that is possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can however, define the value in a JSP like so;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;script …&amp;gt;&lt;BR /&gt;var contextPath = '&amp;lt;%= request.getContextPath() %&amp;gt;';&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 21:09:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254692#M207822</guid>
      <dc:creator>ghl</dc:creator>
      <dc:date>2011-01-31T21:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get context in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254693#M207823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No I can't…there is no JSP, just ftl, js…a share dashlet.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 21:35:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254693#M207823</guid>
      <dc:creator>andrewriver</dc:creator>
      <dc:date>2011-01-31T21:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get context in javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254694#M207824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The freemarker templates have the TemplateNode Model to your disposal.&amp;nbsp; You can inject the context path into your template similar to how I suggested using JSP's using the url templateNode object (url.context).&amp;nbsp; Implementation details really&amp;nbsp; :wink: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/Template_Guide#TemplateNode_Model_API" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Template_Guide#TemplateNode_Model_API&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 17:40:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-context-in-javascript/m-p/254694#M207824</guid>
      <dc:creator>ghl</dc:creator>
      <dc:date>2011-02-02T17:40:40Z</dc:date>
    </item>
  </channel>
</rss>

