cancel
Showing results for 
Search instead for 
Did you mean: 

create page with args

inaam
Confirmed Champ
Confirmed Champ

 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 ?

1 ACCEPTED ANSWER

kalpesh_c2
Star Collaborator
Star Collaborator

You can get your parameter.

in js controller
page.url.args.idworkflow

And in FTL using ${}
${
page.url.args.idworkflow}

View answer in original post

3 REPLIES 3

kalpesh_c2
Star Collaborator
Star Collaborator

You can get your parameter.

in js controller
page.url.args.idworkflow

And in FTL using ${}
${
page.url.args.idworkflow}

afaust
Legendary Innovator
Legendary Innovator

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.

inaam
Confirmed Champ
Confirmed Champ

Thanks every one for the help. 

I did it.