Re: [Cppcms-users] URL maps
Brought to you by:
artyom-beilis
From: Pavel K. <un...@fu...> - 2011-03-25 13:50:47
|
hi, before Artyom gives you more sopisticated answer, look at attach() method (enables generating url - look at blog example). /// Register an application \a app as child and mount it into: /// /// - url_dispatcher calling dispatcher().mount(regex,*app,part); /// - url_mapper calling mapper().mount(name,url,*app); /// /// Ownership of app is transfered to parent. /// void attach(application *app,std::string const &name,std::string const &url,std::string const ®ex,int part); example from my application> attach( new apps::photo( s ), "photo", "/photo{1}", "/photo((/.*)?)", 1 ); attach( new apps::user::app_user( s ), "user", "/user{1}", "/user((/.*)?)", 1 ); pavel. On Friday 25 March 2011, Renato Forti wrote: > Hi, > I am try understand how group and map url. > For sample I have 2 classes: > { > > add(_test, "/test", 1); > > add(_home, "/home", 2); > > } > }; |