Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By lukasss on
How do I add and display the page view entity fields implements in hook_shema, but not fields of add fields API?
I created custom entity of Entity API. I added fields in hook_shema. These fields is work, but not display in the page view entity
Help please!
Comments
Help please!
Help please!
For world peace!
_
database fields of an entity are not 'fields' to drupal and they won't behave as field api fields when handling/viewing the entity. They're considered 'properties'-- you'll need to expose them for viewing yourself via entity meta data wrappers.
the solution here: https:/
the solution here: https://www.drupal.org/node/2220557
I got to add all the properties of an entity in "control of the display", while I added (except, of course, controllers), only here it is:
To output directly to the $ content that's in product_build_content:
In general, it is clear that if we want to get a good performance, it is possible to do so, but if full: multilingual, setting visibility label .... it is still a lot of work
That's what The result was: https://github.com/lukasvs/entity_with_properties_as_fields
For world peace!