diff options
Diffstat (limited to 'src/strusCms.cpp')
-rw-r--r-- | src/strusCms.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/strusCms.cpp b/src/strusCms.cpp index 9c59adf..9190cc3 100644 --- a/src/strusCms.cpp +++ b/src/strusCms.cpp @@ -4,18 +4,32 @@ #include <cppcms/url_dispatcher.h> #include <cppcms/url_mapper.h> #include <cppcms/http_response.h> +#include <cppcms/json.h> + +namespace apps { strusCms::strusCms( cppcms::service &srv ) : cppcms::application( srv ) { + locale_name = "en"; + script = settings( ).get<std::string>( "strusCms.script" ); + dispatcher( ).assign( "", &strusCms::intro, this ); mapper( ).assign( "" ); mapper( ).root( "/strusCms" ); } +std::string strusCms::root( std::string l ) +{ + if( l.empty( ) ) l = locale_name; + return script + "/" + l; +} + void strusCms::intro( ) { - content::master c; + content::intro c; c.title = "strusCms"; render( "intro", c ); } + +} |