core icon indicating copy to clipboard operation
core copied to clipboard

control over headerfields

Open asaage opened this issue 7 years ago • 6 comments

Checklist before I submit this issue report

I confirm that:

  • [x] I have tested this with the latest version available
  • [x] I have read documentation @ http://metamodels.readthedocs.org/en/ or http://metamodels.readthedocs.org/de/
  • [x] I have checked the Contao community forums for references https://community.contao.org/
  • [x] I have checked existing issues for duplicates and found none @ https://github.com/MetaModels/core/issues?q=is%3Aissue

My environment is:

Key Value
PHP version: 7.1.20
Contao version: 3.5.35
DC_General version: 2.0.0-beta47
Installation via composer: contao-community-alliance/composer-client 0.16.6
metamodels/core 2.0.2

Issue description

https://community.contao.org/de/showthread.php?71581-Header-im-parentView

Steps to reproduce

  1. create standalone MM (mm_parent)
  2. create child MM (mm_child)
  3. go to edit-mask of mm_child

Describe the behaviour of the application

There seems to be no configuration options for headerFields it just display's "Änderungsdatum" (tstamp) which is not even an explicit attribute of mm_parent.

Describe the expected behaviour of the application

There should either be a config option (not shure if attributes, input-mask or rendersettings is the right place) or the headerFields should be determined by convention (like allways use id, title, name, headline, tstamp... if present)

Screenshots

image

asaage avatar Aug 12 '18 12:08 asaage

I would not display anything else at this point - it would be important to display the breadcrumb in the header area! https://github.com/MetaModels/core/issues/586

maybe something like this would be great https://github.com/MetaModels/core/issues/178

and that the icon pen leads to the input mask of the parent MMs

zonky2 avatar Aug 12 '18 13:08 zonky2

During the discussion we agreed that it does not need the additional information in the header.

However, we are examining the implementation of a clickable breadcrumb.

@stefanheimes pls check your POC

zonky2 avatar Aug 29 '18 06:08 zonky2

Just wanted to mention that before i updated (it was alpha17 i guess) i did have propper headerfields.

asaage avatar Aug 29 '18 10:08 asaage

You can build an own event listener with BuildDataDefinitionEvent https://github.com/contao-community-alliance/dc-general/blob/master/src/ContaoCommunityAlliance/DcGeneral/Factory/Event/BuildDataDefinitionEvent.php and add your properties

...
$backendView = $container->getDefinition(Contao2BackendViewDefinitionInterface::NAME);

$listingConfig = $backendView->getListingConfig();

$listingConfig->setHeaderPropertyNames(['tstamp', 'name', 'description']);

Edit...

better Event: GetParentHeaderEvent https://github.com/contao-community-alliance/dc-general/blob/d7a265e203f29d9637c20681696b4554cc288829/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/Event/GetParentHeaderEvent.php

(thx @baumannsven)

zonky2 avatar Aug 29 '18 15:08 zonky2

@zonky2 We should split the breadcrumb issue into a separate feature request for 2.2 and assign to @stefanheimes.

discordier avatar Apr 30 '19 20:04 discordier

check breadcrumb in https://github.com/MetaModels/core/issues/586

zonky2 avatar Apr 30 '19 20:04 zonky2