03-05-2018 08:13 AM
Hi,
Ive tried this tutorial to create a new page home-page "Adding a new Surf page to Alfresco Share | Alfresco Documentation ",
My question is how can i create this page with an argument so the url that i can use for examle /home-page?idworkflow={idworkflow}, so later i can use this argument into my component workflow ...
I am new with alfresco, Could you please help me ?
03-05-2018 11:31 PM
You can get your parameter.
in js controller
page.url.args.idworkflow
And in FTL using ${}
${page.url.args.idworkflow}
03-05-2018 11:31 PM
You can get your parameter.
in js controller
page.url.args.idworkflow
And in FTL using ${}
${page.url.args.idworkflow}
03-06-2018 06:16 AM
Indeed, nothing special needs to be done with regards to defining your page. You only need to access the arguments as shown by Kalpesh.
Additionally, you can also use the Spring Surf model objects for pages / template instances and pass URL arguments via the <properties> or <url> element in the component binding section. Unfortunately, the documentation no longer covers this as the "traditional way to define Surf pages" is no longe recommended (Aikau is the default). You can still see that approach in Alfresco code though. All arguments passed in such a way are accessible using the root scope "args" / "argsM" object instead of the page.url.args, which might make your web script code more independant from knowing / accessing any page context data.
03-07-2018 12:40 PM
Thanks every one for the help.
I did it.
Explore our Alfresco products with the links below. Use labels to filter content by product module.