<?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 Webscripts with searchengine friendly urls in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163501#M117299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to implement a webscript with search engine friendly urls, i.e. parameters in as path elements. I couldn't make it work so a created a really simple example which still does not provide the parameter in the javascript:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;testsefurl.get.desc.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;webscript&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;shortname&amp;gt;Test&amp;lt;/shortname&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;description&amp;gt;Test&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url&amp;gt;/test/{id}&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;/webscript&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;testsefurl.get.js:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.result = args.id;&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;testsefurl.get.html.ftl:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;${result}&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Accessing &lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/service/test/1234" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/test/1234&lt;/A&gt;&lt;SPAN&gt; returns an error that the result is undefined - the problem is that the parameter is not passed to the args array in the javascript.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the 2.9C nightly and I am wondering if I stumbled on a bug or if I missed some detail in the webscript definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Florian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2008 21:29:30 GMT</pubDate>
    <dc:creator>flm</dc:creator>
    <dc:date>2008-02-13T21:29:30Z</dc:date>
    <item>
      <title>Webscripts with searchengine friendly urls</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163501#M117299</link>
      <description>Hi,I tried to implement a webscript with search engine friendly urls, i.e. parameters in as path elements. I couldn't make it work so a created a really simple example which still does not provide the parameter in the javascript:testsefurl.get.desc.xml:&amp;lt;webscript&amp;gt;&amp;nbsp; &amp;lt;shortname&amp;gt;Test&amp;lt;/sh</description>
      <pubDate>Wed, 13 Feb 2008 21:29:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163501#M117299</guid>
      <dc:creator>flm</dc:creator>
      <dc:date>2008-02-13T21:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Webscripts with searchengine friendly urls</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163502#M117300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1234 is not an argument, its the url.extension&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For this to work your Javascript should read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;model.result = url.extension;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/Web_Scripts#url" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/Web_Scripts#url&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 22:51:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163502#M117300</guid>
      <dc:creator>mikef</dc:creator>
      <dc:date>2008-02-13T22:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Webscripts with searchengine friendly urls</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163503#M117301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok thanks, now I understand how the matching works. So only the part of the url up to the first parameter is used to match the webscript, everything else becomes the extension. And only the url parameters after the "?" separator are parsed into the args array.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That also means that it's not possible to create two separate scripts for these two urls:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;test/{id}/show&lt;BR /&gt;test/{id}/edit&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Whichever script is registered first will be called in both cases. I don't need that right now but I somehow expected that it would work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 15:07:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163503#M117301</guid>
      <dc:creator>flm</dc:creator>
      <dc:date>2008-02-14T15:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Webscripts with searchengine friendly urls</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163504#M117302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You wouldn't be able to register those two urls.&amp;nbsp; As they wouldn't be considered unique.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That kind of mapping is something we're considering.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 15:34:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscripts-with-searchengine-friendly-urls/m-p/163504#M117302</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2008-02-14T15:34:07Z</dc:date>
    </item>
  </channel>
</rss>

