-
Notifications
You must be signed in to change notification settings - Fork 10
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
PoC custom ItemBodyTemplate #86
Conversation
{items.map((item) => { | ||
const hasType = item['@type']; | ||
const CustomItemBodyTemplate = config.getComponent({ | ||
name: 'ListingItemTemplate', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sneridagh @danalvrz Sorry I'm a bit late with my feedback. There are 2 changes I would submit for consideration:
-
I would call this component
SummaryListingItemTemplate
to make it clearer in the name that it is specifically for the summary variation and not other listing variations. (This one is not used for the default variation, nor the grid...) -
It would be nice if we could register a default version of this template that is used if no component was registered for the specific content type. Then the default could be adjusted by shadowing just that template, rather than this one. But, I think this requires adding support for falling back to a default in the volto registry, and it might be too big a thing to consider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update the name as suggested in 1.
No description provided.