create page with args

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

create page with args

Jump to solution

 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 Solution

Accepted Solutions
Highlighted
Senior Member

Re: create page with args

Jump to solution

You can get your parameter.

in js controller
page.url.args.idworkflow

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

View solution in original post

3 Replies
Highlighted
Senior Member

Re: create page with args

Jump to solution

You can get your parameter.

in js controller
page.url.args.idworkflow

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

View solution in original post

Highlighted
Master

Re: create page with args

Jump to solution

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.

Active Member

Re: create page with args

Jump to solution

Thanks every one for the help. 

I did it.