I have a DB that has the label table with info in it. I created a module in the admin with the only function of listing the information of that table label which fields are: id, text (for ex: 1 Sony, 2 Warner, etc.)
Nevertheless: When I enter to the module -in the browser- I just see the title that I wrote in the generator.yml, but not the display of the fields of the list (this is: from the database). I re-checked in databases.yml that the info there is OK. I can enter to the DB and see the information.
Here are some relevant files:
generator.yml:
generator:
class: sfPropelGenerator
param:
model_class: Label
theme: admin
non_verbose_templates: true
with_show: false
singular: Label
plural: Labels
route_prefix: label
with_propel_route: 1
actions_base_class: sfActions
config:
actions: ~
fields: ~
list:
title: it's working!!
fields:
display: [id, text]
filter: ~
form: ~
edit: ~
new: ~
NOTE: only appears it’s working!! when I do: page.com/label. Not the info of the DB. I already played with the capital letters in the param of the generator.yml. Also, deleted the cache every time, after the changes and checked the indentation -two spaces, no tabs-
In the folder /template I don’t have any template. In /actions I have:
*actions.class.php:*
class labelActions extends sfActions
{
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex(sfWebRequest $request)
{
//$this->forward('default', 'module');
}
}
NOTE: just commented a line. As says the instructions when you create a new module, to eliminate the default Symfony screen.
The routing.yml which is in the config folder of the father of all the modules:
routing.yml:
...
label:
class: sfPropelRouteCollection
options:
model: Label
module: label
prefix_path: /label
column: id
with_wildcard_routes: true
...
NOTE: played with the capital letters too, ex: label, Label, etc. Cleaned cache every time.
Your
actions.class.phpis strange…If you use a generator you must have an actions like that: