Dynamic: Add DynamicContentIncludePage to allow including pages
This commit is contained in:
14
dynamic/dynamiccontentincludepage.cpp
Normal file
14
dynamic/dynamiccontentincludepage.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "dynamiccontentincludepage.h"
|
||||
#include "../parser.h"
|
||||
std::string DynamicContentIncludePage::render()
|
||||
{
|
||||
auto revisionDao = this->database->createRevisionDao();
|
||||
auto rev = revisionDao->getCurrentForPage(this->argument);
|
||||
if(rev)
|
||||
{
|
||||
Parser parser;
|
||||
auto result = parser.parse(*this->database->createPageDao(), *this->urlProvider, rev->content);
|
||||
return result;
|
||||
}
|
||||
return {};
|
||||
}
|
Reference in New Issue
Block a user