return view('front.media-library', $this->_getDataFromCMS());
}
- public function fluidbook($args = '')
+ public function fluidbook($args = '', $frontpath = 'coeur', $storagepath = 'out')
{
if (!$args) {
$args = [];
if (count($args) > 0) {
$path = implode('/', $args);
} else {
- return redirect(backpack_url('front/coeur/index.html'));
+ return redirect(backpack_url('front/' . $frontpath . '/index.html'));
}
- $path = storage_path('fluidbook/out') . '/' . $path;
+ $path = storage_path('fluidbook/' . $storagepath) . '/' . $path;
if (file_exists($path)) {
}
+ public function fluidbookdemo($args)
+ {
+ return $this->fluidbook($args, 'demo', 'demo');
+ }
+
protected function _getDataFromCMS()
{
return ['menu' => $this->_getMenuFromCMS(),
Route::get('ressources.html', 'FrontController@resources');
Route::get('mediatheque.html', 'FrontController@medialibrary');
Route::get('coeur/{args?}', 'FrontController@fluidbook')->where(['args' => '.*']);
+ Route::get('demo/{args?}', 'FrontController@fluidbookdemo')->where(['args' => '.*']);
});