Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
DigitalBase  
View profile  
 More options Nov 6 2008, 12:36 pm
From: DigitalBase <i...@digitalbase.eu>
Date: Thu, 6 Nov 2008 09:36:48 -0800 (PST)
Local: Thurs, Nov 6 2008 12:36 pm
Subject: Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View
For a project i am working on we have a user listing that uses the new
admin generator functionality. We previously used the 1.0 admin
generator and decided to upgrade.

This application has different permission levels (company owners &
general system owners). To avoid copying functionality we want use the
same "user listing" (admin generated) action for those only with
different criteria. For this we are overriding the buildCriteria
method. This is a piece of cake.

Now, how can we distanciate the 2 different list views ? To explain :

- Normal User Listing (for company owner) : /user
- Admin User Listing (for system admins) : /user?view=admin

Now the problem is the generated templates (_pagination.php &
_list_th_tabular.php) do not pass this parameter when paging or
changing sorting.

There should be a simple way to avoid this ?

I already tried manually overriding the different templates, but every
change in generator.yml would mean you'd have to update/rewrite those
templates.

Any thoughts ?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View" by Loïc Vernet
Loïc Vernet  
View profile  
 More options Nov 6 2008, 5:08 pm
From: Loïc Vernet <qrf_c...@yahoo.fr>
Date: Thu, 6 Nov 2008 22:08:50 +0000 (GMT)
Local: Thurs, Nov 6 2008 5:08 pm
Subject: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

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

________________________________
De : DigitalBase <i...@digitalbase.eu>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Jeudi, 6 Novembre 2008, 18h36mn 48s
Objet : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

For a project i am working on we have a user listing that uses the new
admin generator functionality. We previously used the 1.0 admin
generator and decided to upgrade.

This application has different permission levels (company owners &
general system owners). To avoid copying functionality we want use the
same "user listing" (admin generated) action for those only with
different criteria. For this we are overriding the buildCriteria
method. This is a piece of cake.

Now, how can we distanciate the 2 different list views ? To explain :

- Normal User Listing (for company owner) : /user
- Admin User Listing (for system admins) : /user?view=admin

Now the problem is the generated templates (_pagination.php &
_list_th_tabular.php) do not pass this parameter when paging or
changing sorting.

There should be a simple way to avoid this ?

I already tried manually overriding the different templates, but every
change in generator.yml would mean you'd have to update/rewrite those
templates.

Any thoughts ?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DigitalBase  
View profile  
 More options Nov 7 2008, 4:04 am
From: DigitalBase <i...@digitalbase.eu>
Date: Fri, 7 Nov 2008 01:04:41 -0800 (PST)
Local: Fri, Nov 7 2008 4:04 am
Subject: Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View
On Nov 6, 11:08 pm, Loïc Vernet <qrf_c...@yahoo.fr> 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...
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Loïc Vernet  
View profile  
 More options Nov 7 2008, 3:01 pm
From: Loïc Vernet <qrf_c...@yahoo.fr>
Date: Fri, 7 Nov 2008 20:01:32 +0000 (GMT)
Local: Fri, Nov 7 2008 3:01 pm
Subject: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

Try this one then:  :)

http://www.strangebuzz.com/index.php/2008/04/03/31-symfony-10-tutoria...

________________________________
De : DigitalBase <i...@digitalbase.eu>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Vendredi, 7 Novembre 2008, 10h04mn 41s
Objet : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass  parameters to List View

On Nov 6, 11:08 pm, Loïc Vernet <qrf_c...@yahoo.fr> 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...
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DigitalBase  
View profile  
 More options Nov 7 2008, 3:06 pm
From: DigitalBase <i...@digitalbase.eu>
Date: Fri, 7 Nov 2008 12:06:53 -0800 (PST)
Local: Fri, Nov 7 2008 3:06 pm
Subject: Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

On Nov 7, 9:01 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:

Did you actually read this thread?

I did try/read this post (a long time ago). That post is a 1.0
tutorial and clearly not what i am trying to achieve.
I want to override only the templates i want to change, instead of
copy pasting the entire admin generator theme.

[quote]
The generator templates are cut into small parts that can be
overridden independently, and the actions can also be changed one by
one.
[/quote]

This is what i am trying


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View" by Loïc Vernet
Loïc Vernet  
View profile  
 More options Nov 7 2008, 3:29 pm
From: Loïc Vernet <qrf_c...@yahoo.fr>
Date: Fri, 7 Nov 2008 20:29:31 +0000 (GMT)
Local: Fri, Nov 7 2008 3:29 pm
Subject: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

Did you read the tutorial ?

This exactly what you want to achieve, modify the admin generator so you don't have to ovveride the partials in all you admin-gen modules.

I tagged this tutorial as a sf 1.0 tutorial, as the batch feature is already in the 1.1 and 1.2.

Read the comments, this tutorial just work well. And you will also be able to extend a 1.1 or 1.2 admin gen in the same way
(not tested in 1.2 but it should be quiet the same ?)

++ See you tomorrow on IRC, i can help.

________________________________
De : DigitalBase <i...@digitalbase.eu>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Vendredi, 7 Novembre 2008, 21h06mn 53s
Objet : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass  parameters to List View

On Nov 7, 9:01 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:

Did you actually read this thread?

I did try/read this post (a long time ago). That post is a 1.0
tutorial and clearly not what i am trying to achieve.
I want to override only the templates i want to change, instead of
copy pasting the entire admin generator theme.

[quote]
The generator templates are cut into small parts that can be
overridden independently, and the actions can also be changed one by
one.
[/quote]

This is what i am trying


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DigitalBase  
View profile  
 More options Nov 7 2008, 3:32 pm
From: DigitalBase <i...@digitalbase.eu>
Date: Fri, 7 Nov 2008 12:32:21 -0800 (PST)
Local: Fri, Nov 7 2008 3:32 pm
Subject: Re: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

On Nov 7, 9:29 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:

> Did you read the tutorial ?

> This exactly what you want to achieve, modify the admin generator so you don't have to ovveride the partials in all you admin-gen modules.

> I tagged this tutorial as a sf 1.0 tutorial, as the batch feature is already in the 1.1 and 1.2.

> Read the comments, this tutorial just work well. And you will also be able to extend a 1.1 or 1.2 admin gen in the same way
> (not tested in 1.2 but it should be quiet the same ?)

> ++ See you tomorrow on IRC, i can help.

Again, no this tutorial is not what i am trying to achieve. I do not
want to copy the entire admin generator skeleton & templates as they
will still change in the upcoming versions 1.2 & 1.3...
I just want to create an admin generator theme with ONLY the templates
_paginator.php en _list_th_header (or whatever that is called).
Symfony needs to use the other partials/components from the default
admin generator, same for the actions etc...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Loïc Vernet  
View profile  
 More options Nov 7 2008, 3:35 pm
From: Loïc Vernet <qrf_c...@yahoo.fr>
Date: Fri, 7 Nov 2008 20:35:06 +0000 (GMT)
Local: Fri, Nov 7 2008 3:35 pm
Subject: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

enerator:
  class:              sfPropelAdminGenerator
  param:
    model_class:      Question
    theme:            myAdminTheme  # myadmin theme is in a specific plugin

________________________________
De : DigitalBase <i...@digitalbase.eu>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Vendredi, 7 Novembre 2008, 10h04mn 41s
Objet : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass  parameters to List View

On Nov 6, 11:08 pm, Loïc Vernet <qrf_c...@yahoo.fr> 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...
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Re : [symfony-users] Re: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View" by Loïc Vernet
Loïc Vernet  
View profile  
 More options Nov 7 2008, 3:40 pm
From: Loïc Vernet <qrf_c...@yahoo.fr>
Date: Fri, 7 Nov 2008 20:40:07 +0000 (GMT)
Local: Fri, Nov 7 2008 3:40 pm
Subject: Re : [symfony-users] Re: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

You can't because the 1.3 admin-gen could be totally different....

But i suppose you coul't make symbolic link in your plugin to the default admin-gen theme to achieve that.   :)

________________________________
De : DigitalBase <i...@digitalbase.eu>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Vendredi, 7 Novembre 2008, 21h32mn 21s
Objet : [symfony-users] Re: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 -  Customise Baseurl or Pass parameters to List View

On Nov 7, 9:29 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:

> Did you read the tutorial ?

> This exactly what you want to achieve, modify the admin generator so you don't have to ovveride the partials in all you admin-gen modules.

> I tagged this tutorial as a sf 1.0 tutorial, as the batch feature is already in the 1.1 and 1.2.

> Read the comments, this tutorial just work well. And you will also be able to extend a 1.1 or 1.2 admin gen in the same way
> (not tested in 1.2 but it should be quiet the same ?)

> ++ See you tomorrow on IRC, i can help.

Again, no this tutorial is not what i am trying to achieve. I do not
want to copy the entire admin generator skeleton & templates as they
will still change in the upcoming versions 1.2 & 1.3...
I just want to create an admin generator theme with ONLY the templates
_paginator.php en _list_th_header (or whatever that is called).
Symfony needs to use the other partials/components from the default
admin generator, same for the actions etc...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DigitalBase  
View profile  
 More options Nov 7 2008, 3:45 pm
From: DigitalBase <i...@digitalbase.eu>
Date: Fri, 7 Nov 2008 12:45:15 -0800 (PST)
Local: Fri, Nov 7 2008 3:45 pm
Subject: Re: Re : [symfony-users] Re: Re : [symfony-users] Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View
The one i am trying 1.2BET1 already includes the 'new' admin
generator. In the blog of Fabien he writes :

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.

This is exactly what i am trying todo. I do appreciate your help, but
i have created many 1.0 & 1.1 admin generator themes without a
problem. This problem is different.

On Nov 7, 9:40 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View" by Loïc Vernet
Loïc Vernet  
View profile  
 More options Nov 7 2008, 4:03 pm
From: Loïc Vernet <qrf_c...@yahoo.fr>
Date: Fri, 7 Nov 2008 21:03:33 +0000 (GMT)
Local: Fri, Nov 7 2008 4:03 pm
Subject: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View

May be it is a bug then.. I will try tomorrow.

________________________________
De : DigitalBase <i...@digitalbase.eu>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Vendredi, 7 Novembre 2008, 21h45mn 15s
Objet : [symfony-users] Re: Re : [symfony-users] Re: Re : [symfony-users] Re: Re :  [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List  View

The one i am trying 1.2BET1 already includes the 'new' admin
generator. In the blog of Fabien he writes :

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.

This is exactly what i am trying todo. I do appreciate your help, but
i have created many 1.0 & 1.1 admin generator themes without a
problem. This problem is different.

On Nov 7, 9:40 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DigitalBase  
View profile  
 More options Nov 12 2008, 11:55 am
From: DigitalBase <i...@digitalbase.eu>
Date: Wed, 12 Nov 2008 08:55:36 -0800 (PST)
Local: Wed, Nov 12 2008 11:55 am
Subject: Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View
can anyone help me on this, i tried with 1.2BETA2, same problem.

On Nov 7, 10:03 pm, Loïc Vernet <qrf_c...@yahoo.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fredlab  
View profile  
 More options Nov 12 2008, 1:26 pm
From: fredlab <frederic.beauf...@free.fr>
Date: Wed, 12 Nov 2008 10:26:41 -0800 (PST)
Local: Wed, Nov 12 2008 1:26 pm
Subject: Re: Re : [symfony-users] Admin Gen 1.2 - Customise Baseurl or Pass parameters to List View
Hope this help if I understood your question correctly. Please let us
know.

In the generated actions class of the new admin gen in sf 1.2, the
executeFilter(sfWebRequest $request) function does not merged
parameter with the existing filters. Thus from an author index page,
if you create an action to link from an author directly to its list of
articles (i.e. http://..//backend_dev.php/articles/filter?author_id=1,
you are redirected to your articles index page but nothing is
filtered.

To achieve my gooal I have overwrited the executeFilter method by
modifying the line :

$this->setFilters($this->filters->getValues()) to $this->setFilters
(array_merge($this->filters->getValues(), $request->getParameterHolder
()->getAll()));

=> I have tested both with sfpropelplugin and sfdoctrineplugin.  It
also populates your filter form.

Note that I opened a ticket for it (please visit :
http://trac.symfony-project.org/ticket/4871) but I do not know if it
will be included in the generator regarding Fabiens' answer.

Regards,

Fredlab


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google