On Nov 6, 11:08 pm, Loïc Vernet <[EMAIL PROTECTED]> wrote: > Just do the modifications in your own admin generator theme... So you won't > have to overwrite every _pagination.php & _list_th_tabular.php of your admin > gen modules. > > ++ COil
C0il. I tried this, and i do not seem to manage. What i found in documentation : The post http://www.symfony-project.org/blog/2008/10/31/new-in-symfony-1-2-the-admin-generator sais : [quote] If you want to tweak the admin generator to create your own theme, or to bundle your extensions in a plugin, you will find that it is much more easier now: * You don't need to copy all the files of the default theme to create a new one. Just copy the files you need to override. [/quote] In sf1.2 book #admin generator http://www.symfony-project.org/book/1_2/14-Generators#Administration [quote] The generator templates are cut into small parts that can be overridden independently, and the actions can also be changed one by one. However, if you want to override those for several modules in the same way, you should probably create a reusable theme. A theme is a sub-set of templates and actions that can be used by an administration module if specified in the theme value at the beginning of generator.yml. With the default theme, symfony uses the files defined in $sf_symfony_lib_dir/plugins/sfPropelPlugin/data/generator/ sfPropelModule/admin/. The theme files must be located in a project tree structure, in a data/ generator/sfPropelModule/[theme_name]/ directory, and you can bootstrap a new theme by copying the files you want to override from the default theme (located in $sf_symfony_lib_dir/plugins/ sfPropelPlugin/data/generator/sfPropelModule/admin/ directory): [/quote] So what i did : I created a plugin and activated it (plugins/ tmpPropelGeneratorThemePlugin). Then i created the directory structure from the instructions (above). See screenshot : http://www.shareapic.com/public/view/29772 Now i just copied the indexSuccess and added some various "blabla" in the template to check if the template is used. Then i changed the generator.yml to : generator: class: sfPropelGenerator param: model_class: UserProfile theme: tmp non_verbose_templates: false with_show: false singular: ~ plural: ~ route_prefix: autouser with_propel_route: 1 Now when i access the list view again : [?php use_helper('I18N', 'Date') ?] [?php include_partial('profile/ assets') ?] [?php echo Fatal error: Call to a member function getValue() on a non-object in / home/gnelisse/projects_local/trackmypeople/webroot/lib/core/lib/ generator/sfModelGenerator.class.php on line 284 If anyone can help me I will write a wiki tutorial on overriding the admin generator as the one on the wiki is outdated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
