It would be great if contextual links could work.
I've tried adding {{ title_suffix }} to an overridden ECK template:
{% set classes = [
'eck-entity',
] %}
<div{{ attributes.addClass(classes) }}>
{{ title_suffix }}
{{ content }}
</div>
It still doesn't load.
I'm still learning Drupal, but is it possible that it's because of the missing eck.links.contextual.yml file?
Issue fork eck-3116027
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cgmonroe commentedI know this is a bit old but I thought I would document how to do this.
Contextual links are enabled with eck entities. However, there are no default links. You need to add the links yourself using a custom module.
In the custom module, you will need to create a MyModule.links.contextual.yml file. In this file, you will need to define the link information for the ECK entity type(s) you want them to show on. E.g. I have an entity type called snippets. I have added an edit link to them by having the following contents in my module's links.contextual.yml file.
Note that you can actually add links for more than one eck entity type by having more contextual links defined in the yaml and just use the different entity name. The entity name is the group id which is used to decide what links get shown where.
See the core/modules/nodes yml file for an example of duplicating the normal node links. You should also review the documentation on adding contextual links.
Comment #5
dieterholvoet commentedI opened an MR with code that automatically adds contextual links for all ECK types instead of having to define them manually in a yml file. Could someone test?
Comment #6
dieterholvoet commented