sulu-demo icon indicating copy to clipboard operation
sulu-demo copied to clipboard

[Example] Modify list and form of built-in category entity

Open niklasnatter opened this issue 4 years ago • 3 comments

What's in this PR?

This PR demonstrates how to modify the list view and the form view of the the built-in category entity. The example hides the key property and adds an additional color property to the list view and form view of the category entity.

To implement the color property, the PR extends the category entity and adds a Symfony event listener to persist and serialize the data of the new property.

Screenshot 2021-02-15 at 14 21 31

To apply the changes, the schema of the database needs to be updated by executing bin/console doctrine:schema:update --force.

niklasnatter avatar Feb 15 '21 12:02 niklasnatter

Hello, how to get the new property color on frontend when categories are used with pages ? Thanks

rflorent avatar Mar 17 '22 13:03 rflorent

@rflorent

You can get this by passing additional data to the controller.

matthiasseghers avatar May 10 '23 15:05 matthiasseghers