Skip to content
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

Expose dataset properties as pseudo/extra fields #4115

Open
stefan-korn opened this issue Feb 9, 2024 · 4 comments · May be fixed by #4116
Open

Expose dataset properties as pseudo/extra fields #4115

stefan-korn opened this issue Feb 9, 2024 · 4 comments · May be fixed by #4116
Assignees

Comments

@stefan-korn
Copy link
Contributor

User Story

One might find it beneficial to expose the dataset properties as pseudo/extra fields to use them in the display mode settings of data content type at admin/structure/types/manage/data/display

Remark: To use this, one would need to change/override the template modules/metastore/templates/node--data.html.twig

Acceptance Criteria

Show properties of dataset at admin/structure/types/manage/data/display and output them if configured.

@github-actions github-actions bot added this to Incoming/Triage in DKAN 2 Issue Triage Feb 9, 2024
stefan-korn added a commit to stefan-korn/dkan that referenced this issue Feb 9, 2024
@stefan-korn stefan-korn linked a pull request Feb 9, 2024 that will close this issue
3 tasks
@dafeder
Copy link
Member

dafeder commented Apr 5, 2024

Taking a look at this -- in general I'm wary of making promises of integrating with Drupal field system that will be too difficult/complex to keep with different kinds of schemas. But I'll reserve judgement till I've taken your PR for a spin :)

@dafeder dafeder self-assigned this Apr 5, 2024
@stefan-korn
Copy link
Contributor Author

@dafeder : I understand that you are wary of this.

But if one plans to use heavily customized schema (and not planning to use the React frontend) the preprocessing at metastore_preprocess_node__data and the fixed node template seems kind of very hardcoded and lack flexibility imho. Getting the schema properties back in the Drupal fields with using the Search API implementation seems very flexible to me, so I would at least like to share this with you. We can realize a few things with this solution very easy without doing too much hardcoding.

@swirtSJW
Copy link

I see a real power in this, especially as it paves the way for being able to surface JSON Metadata elements in Views.

@stefan-korn
Copy link
Contributor Author

I need a somehow more sophisticated version of this (providing labels, etc.). So I will be going with a separate module for now. Will mention the module in the discussions section later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
DKAN 2 Issue Triage
  
Incoming/Triage
Development

Successfully merging a pull request may close this issue.

3 participants