Customisation
- Page URLs
- Profile form fields
- Invitation email text
- Invitation email from address and name
- Control panel create form fields
- Control panel labels
Page URLs
You can change the URLs used for the pages by updating the statamic.memberbox.routes config option. You can also disable a specific pages by removing them:
If you want to use something other than the user's ID in the listing show URLs you can update the mb:user:show_url tag in the index template and the mb:member tag in the show template as follows:
Profile form fields
If you don't need file upload support you should use Statamic's built-in user:profile_form tag instead. Available in Statamic 3.3.61+.
Only fields listed in the statamic.memberbox.profile_fields config option can be submitted through the profile form. The fields listed must match the fields in your form. To do that open config/statamic/memberbox.php and add your fields:
Uploading files
You can upload files to user assets fields through the profile form. You'll need to add files="true" to the profile form tag, then a file input to your template:
Invitation email text
You can customise the welcome email text by publishing the translation files:
And then opening lang/vendor/statamic-memberbox/en/messages.php to customise the text.
Invitation email from address and name
You can customise who the invitation email comes from by updating the statamic.memberbox.invitation_from config option:
Control panel create form fields
You can add additional fields to the control panel create user form by adding them to the User blueprint and then updating the statamic.memberbox.cp_create_fields config option:
Fields will appear in the order they're defined in the User blueprint. The email field will always be included. The password, roles and groups fields will always be excluded.
Control panel labels
If you'd like to rename the control panel section and other references to "members" create a new JSON file at resources/lang/*.json and add the strings you'd like to change. For example:
Additional strings can be customised in the lang/vendor/statamic-memberbox/en/messages.php file.