blob: 9190cc3b761e0a40e3321b4f03ad9d6e235d4706 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include "strusCms.hpp"
#include "content.hpp"
#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::intro c;
c.title = "strusCms";
render( "intro", c );
}
}
|