Include fichier css dans html.twig symfony 2 templatei
Linaro
Messages postés
14
Statut
Membre
-
Somaxone Messages postés 2 Statut Membre -
Somaxone Messages postés 2 Statut Membre -
Bonjour,
je suis débutant en symfony2 j'ai crée un nouveau bundle HtmlBundle pour et j' ai essayé d'inclure une fichier css dans un fichier html.twig et ça marche marche elle ne donne pas aucune résultat .
fichier css : src/Tuto/HtmlBundle/public/css/style.css
fichier html.twig : src/Tuto/HtmlBundle/Resources/views/Public/index.html.twig
*************************index.htm.twig**************
<head>
<meta charset="utf-8">
<title>Html + CSS in Symfony PHP Project</title>
{% block stylesheets %}
<link href="{{ asset('bundles/tutohtml/css/style.css') }}" rel="stylesheet" />
{% endblock %}
</head>
<body>
<div class="container">
<section id="content">
<form action="">
<h1>Login Form</h1>
<div>
<input type="text" placeholder="Username" required="" id="username" />
</div>
<div>
<input type="password" placeholder="Password" required="" id="password" />
</div>
<div>
<input type="submit" value="Log in" />
<a href="#">Lost your password?</a>
<a href="#">Register</a>
</div>
</form><!-- form -->
<div class="button">
<a href="#">Download source file</a>
</div><!-- button -->
</section><!-- content -->
</div><!-- container -->
</body>
</html>
-------------------------------------------------------
encore j'ai excécuté la commande php app/console assets:install web --symlink
rien ne change et il n' y' pas d'effet de css dans le navigateur
je suis débutant en symfony2 j'ai crée un nouveau bundle HtmlBundle pour et j' ai essayé d'inclure une fichier css dans un fichier html.twig et ça marche marche elle ne donne pas aucune résultat .
fichier css : src/Tuto/HtmlBundle/public/css/style.css
fichier html.twig : src/Tuto/HtmlBundle/Resources/views/Public/index.html.twig
*************************index.htm.twig**************
<head>
<meta charset="utf-8">
<title>Html + CSS in Symfony PHP Project</title>
{% block stylesheets %}
<link href="{{ asset('bundles/tutohtml/css/style.css') }}" rel="stylesheet" />
{% endblock %}
</head>
<body>
<div class="container">
<section id="content">
<form action="">
<h1>Login Form</h1>
<div>
<input type="text" placeholder="Username" required="" id="username" />
</div>
<div>
<input type="password" placeholder="Password" required="" id="password" />
</div>
<div>
<input type="submit" value="Log in" />
<a href="#">Lost your password?</a>
<a href="#">Register</a>
</div>
</form><!-- form -->
<div class="button">
<a href="#">Download source file</a>
</div><!-- button -->
</section><!-- content -->
</div><!-- container -->
</body>
</html>
-------------------------------------------------------
encore j'ai excécuté la commande php app/console assets:install web --symlink
rien ne change et il n' y' pas d'effet de css dans le navigateur
A voir également:
- Include twig
- Problème include QApplication ✓ - Forum C++
- #Include en C , a quoi ça sert ??? ✓ - Forum C
- Balise html INCLUDE ✓ - Forum HTML
- I'm sorry to have to inform you that your message could not be delivered to one or more recipients. it's attached below. for further assistance, please send mail to postmaster. if you do so, please include this problem report. you can delete your own text from the attached returned message ✓ - Forum Mail
- Probleme variable Twig dans code jquery [Urgent] - Forum Javascript