i'm working on a symfony project, but by now that i'm a noob in web developement i'm doing the famous jobeet tutorial.
My problem is:
When i autogenerate the backend app, i see the plain layout defined in the /apps/backend/templates/l开发者_如何学JAVAayout.php file. This have happened to me generating other things but this time i have no files to touch and manualy add the style sheets. So
my question is:
Where are the files i have to modify to apply a *.css file? (if any)
clue: i don't have the jobeet project on the web root folder in the server (/var/www/), i have it in a subdirectory in that directory (/var/www/folder/jobeet/). Can this thing be the cause of the problem? (maybe some autogenerated configuration files have absolute routes)
clue_2: looking at the html code i can see the references to the stylesheet files:
<link rel="stylesheet" type="text/css" media="screen" href="/folder/jobeet/web/sfPropelPlugin/css/global.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/folder/jobeet/web/sfPropelPlugin/css/default.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/folder/jobeet/web/css/main.css" />
<link rel="stylesheet" type="text/css" href="/folder/jobeet/web/css/admin.css" />
Edit:
in the backend's job and category modules, the only files are generator.yml. In the job file, for example, i can find this:
generator:
class: sfPropelGenerator
param:
model_class: JobeetJob
theme: admin
non_verbose_templates: true
with_show: false
singular: JobeetJob
plural: JobeetJobs
route_prefix: jobeet_job
with_propel_route: 1
actions_base_class: sfActions
config:
actions: ~
fields:
is_activated: { label: Activated?, help: Whether the user has activated the job, or not }
is_public: { label: Public?, help: Whether the job can also be published on affiliate websites, or not }
list:
title: Job Management
layout: stacked
display: [company, position, location, url, is_activated, email]
#params: |
# %%is_activated%% <small>%%category_id%%</small> - %%company%%
# (<em>%%email%%</em>) is looking for a %%=position%% (%%location%%)
filter: ~
form: ~
edit:
title: Editing job "%%company%%" is looking for a "%%position%%"
new:
title: Job Creation
When i uncomment the param lines i have a 500 server internal error message. Is really frustrating when its a copy+paste from the tutorial web.
Solved:
For some strange reason, removing the multiline mode fo the params: definition (in generator.yml) the stylesheet loads correctly. I dont have idea why is that :S
`params: %%is_activated%% <small>%%category_id%%</small> - %%company%% (<em>%%email%%</em>) is looking for a %%=position%% (%%location%%)`
Do you have use this command ?
symfony plugin:publish-assets
This must "create" sfPropelPlugin directory in your web directory...
精彩评论