Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Add $titleLabel to BaseModuleController #1948

Closed
boonstoppel opened this issue Nov 24, 2022 · 2 comments · Fixed by #2318
Closed

[3.x] Add $titleLabel to BaseModuleController #1948

boonstoppel opened this issue Nov 24, 2022 · 2 comments · Fixed by #2318
Labels
good first issue Issues that are easy to get started with. Ideal for Twill beginners to dive into the code base. type: enhancement New feature or request

Comments

@boonstoppel
Copy link

Summary

Currently it is possible to overwrite the "title" key for the "create modal" to something custom. This is done in the Controller (BaseModuleController).

For example:
protected $titleColumnKey = 'user_fullname';

When this is done the Label of said field will be displayed as "user_fullname", which is not very appealing.

It would be useful to be able to also overwrite the Label for that column key by either defining it like this:
protected $titleColumnLabel = 'User Fullname';

Or defining it directly as:

protected $titleColumn = [
   'user_fullname' => 'User Fullname'
];
@boonstoppel
Copy link
Author

This label value could also be used as label for the column on the overview page where all data for that module is listed. By default that column is also title. When it is overwritten with $titleColumnKey you are currently auto generating that label eg. "user_fullname" becomes "User Fullname".

@boonstoppel
Copy link
Author

There is also $titleFormKey, but it's unclear what that property does.

@haringsrob haringsrob added type: enhancement New feature or request good first issue Issues that are easy to get started with. Ideal for Twill beginners to dive into the code base. labels Nov 25, 2022
@haringsrob haringsrob changed the title Add $titleLabel to BaseModuleController [3.x] Add $titleLabel to BaseModuleController Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are easy to get started with. Ideal for Twill beginners to dive into the code base. type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants