el-cms / superBake

superBake repository for CakePHP 2.3.x
Other
12 stars 2 forks source link

No 'enableSession' support #34

Closed mtancoigne closed 10 years ago

mtancoigne commented 10 years ago

That would be great to have a theme.enableSession options, and use this value to handle sessions in actions templates.

mtancoigne commented 10 years ago

That would change this template

<?php if ($wannaUseSession): ?>
                <?php echo $this->setFlash('Your account has been successfully created. Please log in', 'success');?>
                $this->redirect(<?php echo $this->url('login',$controllerName)?>);
<?php else: ?>
                $this->flash(<?php echo $this->iString('Your account has been sucessfully created. Please log in.')?>, <?php echo $this->url('login', $controllerName)?>);
<?php endif; ?>

into something like this: (setFlash() should handle the session option)

<?php echo $this->setFlash('Your account has been successfully created. Please log in', 'success');?>
mtancoigne commented 10 years ago

This will be done in next commit; A general.useSession option has been added in config file. Use it twhen you need it ;)