Re: [Cppcms-users] mapping across mount_points
Brought to you by:
artyom-beilis
|
From: Marcel H. <ke...@co...> - 2013-07-14 22:13:10
|
On 15.07.2013 00:00, Petr Janda wrote:
> Suggest you use mapper(value), instead of mapper(key, value) for
> index-style pages. Saves typing and is more clear, imo.
>
> ie. call to url("") will create a link to the root(the so called "index"
> page) of the current application.
>> And calling url("/bar/index") doesn't work? It should if Bar is a
>> sub-application.
Hmmm, nope. Everything throws an exception. I have another problem with
mount_points but this is not the current topic. I will provide my
current mapping here:
main.cpp
> app.mount(...<dispatcher>...);
dispatcher.cpp
> attach(new Index(srv),
> "index", "/index{1}",
> "/index(/(.*))?", 1);
>
> mapper().root(settings().get<std::string>("app.root"));
index.cpp
> dispatcher().assign(".*", &Index::index, this);
> mapper().assign("index", "/index");
Tell me whats wrong. I'm not an expert in mapping, in fact I'm very
miserable.
|