1
votes

I'd like to add the list of filters in the title of my executeIndex method. Does anyone know if it's possible to override the admin generator list title from the executeIndex method?

I've been searching for hours to find the list.title variable in the generator config and how to override it.

Any ideas would be appreciated!

Thanks in advance

2

2 Answers

2
votes

Have you tried overwritting the template the generators uses to render the newSuccess.php template? It could be easily located under the cache directory.

hint: cache/app_name/env/module/template/ there are all the temaptles generated by the admin-generator.

If you copy the one you need in your module/template folder, it should overwrite the cached one

1
votes

You need to override the getListTitle() method in your GeneratorConfiguraiton class which would be be found at

/apps/[admin_app]/modules/[module_name]/lib/[module_name]GeneratorConfiguration.class.php

like:

public function getListTitle()
{
    return 'Your new list title';
}

...then clear your cache ;)

NOTE: if you're trying to do some dynamic title generation it will not carry over unless there is a cache clear, so overriding the template may ultimately be your best option.