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 ?
Solved! Go to Solution.
You can get your parameter.
in js controller
page.url.args.idworkflow
And in FTL using ${}
${page.url.args.idworkflow}
You can get your parameter.
in js controller
page.url.args.idworkflow
And in FTL using ${}
${page.url.args.idworkflow}
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.
Thanks every one for the help.
I did it.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.