Skip to content

Conversation

@oliverkroener
Copy link

Hi T3H,

I wanted to include other data in the JSON menu response.

However, appendData only allows 0/1

Often I want to include only certain fields, so I changed the code:

.appendData = field1, field2 ...

This would only include the mentioned fields, not all of them and reduce the size of the payload.

I hope you could agree with my approach (docs will follow later)?

Thanks,

Oliver

Copy link
Collaborator

@twoldanski twoldanski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for contribution!

This feature is duplicating a bit existing feature, but nevertheless we can add this new option to simplify some of the cases of passing new fields).

I added some comments.

PS. if you can please squash commits, so we can have one commit to merge.

) {
// Items to keep
$removeAll = !isset($processorConfiguration['appendData']) || $processorConfiguration['appendData'] == 0;
$keepItems = $removeAll ? [] : array_flip(array_map('trim', explode(',', $processorConfiguration['appendData'])));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add new option like keep(Items|fields) or passFields to keep clear what is happening also do not change behavior of flag appendData to keep BC, also you can use GeneralUtility:trimExplode

@lukaszuznanski
Copy link
Collaborator

@oliverkroener are you willing to push those changes from review?

kitzberger and others added 6 commits February 20, 2025 11:59
Without a frontendApiProxy in the site config, URLs to local files contain two slashes like www.mysite.org//fileadmin/my-image.jpg
…s#800)

This patch prepares backend for nuxt-typo3 implementation.
…-Headless#802)

- By default generate language attributes for html tag based on current language page, so nuxt does not have to do it manually
- support custom attributes like `config.htmlTag.attributes.class = no-js` with option to override default attributes

- Add support for setting body tag attributes via `page.bodyTagAdd` Typoscript directive, so frontend app can automatically apply it via nuxt feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants