<?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 args from get.js to .get.html.ftl in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10472#M4654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have a simple dashlet&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just woud like to send a custom variable from my file get.js to my freemarker&lt;/P&gt;&lt;P&gt;something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my files get.js&lt;/P&gt;&lt;P&gt;***********************&lt;/P&gt;&lt;P&gt;function main()&lt;BR /&gt;{&lt;BR /&gt; var remoteURL = "/dashlet/relance"; &lt;SPAN style="color: #339966;"&gt;//the url of the webscript repo&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt; var connector = remote.connect("alfresco");&lt;BR /&gt; var json = connector.get(remoteURL);&lt;BR /&gt; var result = eval("(" + json + ")");&lt;/P&gt;&lt;P&gt;model.allRelances = result.relance; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color: #339966;"&gt;//this is actually working&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;var structure = ' &amp;nbsp;{"structure" : [ &amp;nbsp;{ &amp;nbsp;"struct" : "&lt;SPAN style="color: #ff6600; text-decoration: underline;"&gt;CUSTOM_VAR&lt;/SPAN&gt;" &amp;nbsp;} &amp;nbsp;] &amp;nbsp;} &amp;nbsp; ';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;model.structure = structure;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;main();&lt;/P&gt;&lt;P&gt;*********************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in my file .get.html.ftl I could use it in condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;#if structure.&lt;SPAN style="color: #ff6600;"&gt;struct&lt;/SPAN&gt;??&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;#if &lt;/SPAN&gt;&lt;SPAN&gt;structure.&lt;SPAN style="color: #ff6600;"&gt;struct&lt;/SPAN&gt; == "custom_condition"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thank you&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2017 14:27:04 GMT</pubDate>
    <dc:creator>redraccoon</dc:creator>
    <dc:date>2017-03-14T14:27:04Z</dc:date>
    <item>
      <title>args from get.js to .get.html.ftl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10472#M4654</link>
      <description>HelloI have a simple dashlet&amp;nbsp;I just woud like to send a custom variable from my file get.js to my freemarkersomething like thismy files get.js***********************function main(){ var remoteURL = "/dashlet/relance"; //the url of the webscript repo&amp;nbsp; var connector = remote.connect("alfresco"); var j</description>
      <pubDate>Tue, 14 Mar 2017 14:27:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10472#M4654</guid>
      <dc:creator>redraccoon</dc:creator>
      <dc:date>2017-03-14T14:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: args from get.js to .get.html.ftl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10473#M4655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For converting between Json string representation and JavaScript objects and vice versa, you can use Alfresco's jsonUtils &amp;nbsp;(see docs.alfresco.com).&lt;/P&gt;&lt;P&gt;But to get the value of your custom variable you could just write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;model.structure={struct:"CUSTOM_VAR"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you get "CUSTOM_VAR" from using structure.struct in your template. I think...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:11:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10473#M4655</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-03-14T15:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: args from get.js to .get.html.ftl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10474#M4656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the get.js&lt;/P&gt;&lt;P&gt;model.custom = "rien";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the ftl&lt;/P&gt;&lt;P&gt;"${&lt;SPAN&gt;custom&lt;/SPAN&gt;}"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:13:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10474#M4656</guid>
      <dc:creator>redraccoon</dc:creator>
      <dc:date>2017-03-14T15:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: args from get.js to .get.html.ftl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10475#M4657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ftl you need to use ${variablename} to eval your variable to a string - used mainly for "printout" it's value.&lt;/P&gt;&lt;P&gt;In Conditions, loops, etc. you can use your variables directly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:23:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/args-from-get-js-to-get-html-ftl/m-p/10475#M4657</guid>
      <dc:creator>mehe</dc:creator>
      <dc:date>2017-03-14T15:23:39Z</dc:date>
    </item>
  </channel>
</rss>

