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] Set to v12 support #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

spoonerWeb
Copy link

  • Drop v11 support
  • Use event instead of hook
  • Use ViewHelper to handle in backend templates
  • Adapt CSS and JS to new v12 backend

@sorenmalling
Copy link

Wrongly pushed PR (had some custom UI stuff changes) but this PR also introduces support for collapsing a whole column
#8

Should we merge these two into a single PR @spoonerWeb

@sypets
Copy link

sypets commented Dec 10, 2024

I am using the code from this PR but have these problems:

I also tried the version from the closed PR #8 @sorenmalling but the columns and content elements were not collapsible as advertised.

In a previous version (in v11) I have this: ce (container and non-container) within container are collapsible:

image

@sypets
Copy link

sypets commented Dec 10, 2024

About the problem of the collapse buttons not being displayed in the children:

I also noticed, that all children of the container use the partial Resources/Private/Partials/PageLayout/RecordDefault/Header.html in cms-backend while the parent uses the partial Resources/Private/TemplateOverrides/Partials/PageLayout/RecordDefault/Header.html in collapse

so when the Templates are called in the core Page Layout, the override of partial Header works, but when templates are called from b13/container partial Resources/Private/Partials12/PageLayout/Record.html, the override does not work and the core cms-backend Header.html is used.


image


Extensions with backend modules that use the Simplified backend module template API automatically enable the general backend template override feature.

https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-96812-OverrideBackendTemplatesWithTSconfig.html

@sypets
Copy link

sypets commented Jan 9, 2025

The following fixed the problem "CE and container within a container are not collapsible (this used to work)"

  1. in collapse/Classes/ViewHelpers/CollapseViewHelper.php
-        if ($type instanceof GridColumnItem && !$type instanceof ContainerGridColumnItem) {
+        if ($type instanceof GridColumnItem || $type instanceof ContainerGridColumnItem) {

  1. in cms-backend: Resources/Private/Partials/PageLayout/RecordDefault/Header.html
+<html
+    xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
+    xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
+    xmlns:c="http://typo3.org/ns/B13/Collapse/ViewHelpers"
+    data-namespace-typo3-fluid="true"
+>
 <div class="t3-page-ce-header {f:if(condition: '{allowEditContent} && {item.dragAndDropAllowed}', then: 't3-page-ce-header-draggable t3js-page-ce-draghandle')}">
     <div class="t3-page-ce-header-left">
         {item.icons -> f:format.raw()}
@@ -44,7 +50,9 @@
                             data-contextmenu-uid="{item.record.uid}">
                         <core:icon identifier="actions-menu-alternative" />
                     </button>
+
                 </div>
+                <c:collapse contentElementId="{item.record.uid}" row="{item.record}" type="{item}" />
      

Unfortunately, I could not yet figure out how to get it to use the collapse partial and not the backend partial for the nested elements (as mentioned above).

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.

3 participants