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

[FEATURE] Add contentObjectData to fluid view #4018

Open
mhirdes opened this issue Apr 29, 2024 · 1 comment
Open

[FEATURE] Add contentObjectData to fluid view #4018

mhirdes opened this issue Apr 29, 2024 · 1 comment

Comments

@mhirdes
Copy link
Contributor

mhirdes commented Apr 29, 2024

Is your feature request related to a problem? Please describe.
I would like to insert the search form on two different places in our template with f:cObject. To seperat these two layouts from each other, it would be awesome to have access to the content object. Then I can call the view via:
<f:cObject typoscriptObjectPath="tt_content.list.20.solr_pi_search" data="{template: 'myTemplate'}"/>

and in my template Form.html

<f:if condition="{contentObjectData.template} == 'myTemplate'">

Describe the solution you'd like
Add to the controller the following line:
$view->assign('contentObjectData', $this->configurationManager->getContentObject()->data);

Target versions
TYPO3 v12

@christophlehmann
Copy link
Contributor

The current content object should also be available as request attribute (since v11/v12 ?!)

dkd-kaehm pushed a commit that referenced this issue May 16, 2024
Add record data of current content object in all actions of Search controller

Fixes: #4018
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

No branches or pull requests

2 participants