Improving navigation

This commit is contained in:
Marc Ducobu 2014-11-11 16:56:20 +01:00
parent 5ecfd89126
commit 6642edb3e9
4 changed files with 43 additions and 56 deletions

View File

@ -8,22 +8,6 @@ class DefaultController extends Controller
{ {
public function indexAction() public function indexAction()
{ {
$a = array(
array('success', "Message de succès (success)! "),
array('success',"Un autre message de succès ! "),
array('danger' , "(danger)Avert lorem ipsum dolor sit amet spiritur"),
array('danger' ,"Avertum ipsut est amet amergitur tatouari"),
array('info' , "(info) Un message d'information s'affiche."),
array('info' , "Info informitur escept asolitur amet. Sit Roberetur astot.")
);
if ($this->getRequest()->query->get('addMessages', 1)) {
foreach ($a as $array) {
$this->get('session')->getFlashBag()->add($array[0], $array[1]);
}
}
return $this->render('ChillMainBundle::layout.html.twig'); return $this->render('ChillMainBundle::layout.html.twig');
} }
} }

View File

@ -2,16 +2,16 @@ root:
pattern: / pattern: /
defaults: defaults:
_controller: FrameworkBundle:Redirect:urlRedirect _controller: FrameworkBundle:Redirect:urlRedirect
path: /hello path: /welcome
permanent: true permanent: true
options: options:
menus: menus:
main: main:
order: 10 order: 10
label: homepage label: Homepage
cl_chill_main_homepage: cl_chill_main_homepage:
pattern: /hello pattern: /welcome
defaults: { _controller: ChillMainBundle:Default:index } defaults: { _controller: ChillMainBundle:Default:index }
chill_main_admin_central: chill_main_admin_central:
@ -21,7 +21,7 @@ chill_main_admin_central:
menus: menus:
main: main:
order: 20 order: 20
label: homepage label: Admin Menu
login: login:
path: /login path: /login

View File

@ -1 +0,0 @@
Hello {{ name }}!

View File

@ -65,6 +65,8 @@
</div> </div>
</header> </header>
<div class="container">
{% block layout_content %}
{# Flash messages ! #} {# Flash messages ! #}
<div class="container"> <div class="container">
{% for flashMessage in app.session.flashbag.get('success') %} {% for flashMessage in app.session.flashbag.get('success') %}
@ -92,15 +94,17 @@
{% endfor %} {% endfor %}
</div> </div>
<div class="container"> {{ chill_menu('main', {
{% block content %} 'layout': 'ChillPersonBundle::menu.html.twig',
<h1>Title</h1> }) }}
<p> Hello ! </p>
<div class="medium primary btn"> {% block content %}
<a href="#">Primary</a> <div class="grid-8">
<h1>Welcome to Chill</h1>
</div> </div>
{% endblock %} {% endblock %}
{% endblock %}
</div> </div>
<footer class="footer"> <footer class="footer">