The rules of a .css are not applied to the templates of sfDoctrineGuardPlugin [message #96646] |
Fri, 02 April 2010 00:58  |
tirengarfio Messages: 64 Registered: March 2009 |
Member |
|
|
Hi,
i have this line below in frontend/config/view.yml:
The rules of that file are applied to the templates of the modules of frontend, but no to the templates of sfDoctrineGuardPlugin.
What should i do?
Javi
Desde Madrid...
|
|
|
|
Re: The rules of a .css are not applied to the templates of sfDoctrineGuardPlugin [message #96733 is a reply to message #96696 ] |
Sat, 03 April 2010 12:21   |
tirengarfio Messages: 64 Registered: March 2009 |
Member |
|
|
Hi Hale,
this is my frontend/config/view.yml:
default:
http_metas:
content-type: text/html
metas:
#title: symfony project
#description: symfony project
#keywords: symfony, project
#language: en
#robots: index, follow
stylesheets: [main.css]
javascripts:
- %SF_PROTOTYPE_WEB_DIR%/js/prototype.js
- %SF_PROTOTYPE_WEB_DIR%/js/scriptaculous.js
has_layout: on
layout: layout
signinSuccess:
has_layout: off
cambiarAvatarSuccess:
has_layout: off
passwordSuccess:
has_layout: off
#
#_send_request_reset_password:
# has_layout: off
#
# _send_reset_password:
# has_layout: off
invalid_keySuccess:
has_layout: off
request_reset_passwordSuccess:
has_layout: off
reset_passwordSuccess:
has_layout: off
registerSuccess:
has_layout: off
register_completeSuccess:
has_layout: off
request_confirm_registerSuccess:
has_layout: off
Anyway, in signinSuccess.php (doesn't matter the place) i have written this lines:
<?php use_stylesheet('main.css') ?>
<link rel="stylesheet" type="text/css" href="/css/main.css">
The first one does not include 'main.css' in signinSuccess.php but the second one yes.
In other frontend modules, when using <?php
use_stylesheet('main.css') ?> main.css is included.
Anyone knows why?
Javi
[Updated on: Sat, 03 April 2010 14:42] Desde Madrid...
|
|
|
Re: The rules of a .css are not applied to the templates of sfDoctrineGuardPlugin [message #96937 is a reply to message #96733 ] |
Wed, 07 April 2010 23:20   |
hsostock Messages: 96 Registered: November 2009 |
Member |
|
|
Hi Javi,
I remember encountering this problem in my application, and I believe it is due to the fact that when signinSuccess.php is loaded, the user has not yet been authenticated and does not have access to the site's resources (in fact, when viewing the page resources with Firefox's developer tools, I got a 401 - unauthorized error for the stylesheets and scripts). For me, the solution was to create a view.yml file in the config folder for the sfGuardAuth module, and specify the needed resources there. This is what mine ended up looking like:
# /apps/frontend/modules/sfGuardAuth/config/view.yml
signinSuccess:
has_layout: true
layout: signinLayout
stylesheets: [reset.css, signin.css]
Hope this helps,
Hale
|
|
|
Re: The rules of a .css are not applied to the templates of sfDoctrineGuardPlugin [message #97183 is a reply to message #96937 ] |
Mon, 12 April 2010 15:14  |
tirengarfio Messages: 64 Registered: March 2009 |
Member |
|
|
Thanks, but it didn't work..
Javi
Desde Madrid...
|
|
|