Project

General

Profile

Actions

Feature #70285

closed

Layout for content elements

Added by Rafal Brzeski over 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Fluid Styled Content
Target version:
-
Start date:
2015-10-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I didn't found possibility to use Layout field from Appearance tab to wrap content elements, this feature is very important,
and I think this need to be accessed by default in every content elements.

Actions #1

Updated by Rafal Brzeski over 8 years ago

Please assign that issue to category "Fluid styled content"

Actions #2

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Fluid Styled Content
Actions #3

Updated by Benni Mack over 8 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (7 LTS)

Hey,

how should it be used. "Layout" is quite generic. We could add a class around the content element, depending on the layout. but how should this be made configurable? Any tips welcome!

Actions #4

Updated by Claus Due over 8 years ago

but how should this be made configurable? Any tips welcome!

It really, really is too bad that Helmut put the -2 on the Fluid standalone merging or you would have had this feature by now:

https://github.com/TYPO3Fluid/Fluid/commit/454121cba81baed4e3fe526412ff3e14f7c499a9

You'd be hard pressed to find a more ideal way of doing exactly this thing. But, sadly, Fluid doesn't support this in CMS and won't anytime soon I think - basically, the View of CMS Fluid doesn't support the necessary optional flags for this to work.

I certainly wouldn't attempt this with just standard Layouts even if their names could be based on frame selection; nor a predefined CSS class name wrapping element. If you had been able to `f:render` as described in the link it would have been an easy matter to add any number of wrapping tags whose names can be partials or sections; selectable in user form fields.

You could mark this one as "won't have at this time" and expect it to solve itself once Helmut converts his two-weeks-unexplained -2 that's blocking the Fluid merge!

Actions #5

Updated by Rafal Brzeski over 8 years ago

I'm not experienced like Claus Due at this place, but I think that this may be achieved by using <f:switch> like it was already done with headers here:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html

Actions #6

Updated by Claus Due over 8 years ago

I'm not experienced like Claus Due at this place, but I think that this may be achieved by using <f:switch> like it was already done with headers here:

Unfortunately that's not possible with the `f:layout` node. The reason is that it gets processed in a very special way (which by the way is changed to a more standard way in standalone Fluid!) using a "post parse event facet interface" (which is also deleted in standalone Fluid) - and this node causes a property to be set in the parsed template containing the layout name. Essentially, `f:layout` is a unique tag and only the last one will be respected, but this uniqueness is during parsing, not during rendering. Had it been during rendering, `f:switch` would have worked. It is during rendering in standalone Fluid. Anyone would be forgiven for not knowing this ;)

So this solution, too, is impossible in current Fluid but would have been perfectly possible had standalone Fluid been a dependency at this time.

Actions #7

Updated by Claus Due over 8 years ago

Just for the sake of completeness: yes, the Layout can be "dynamic" but only the content of the "name" attribute and only dynamic to such an extent that the correct Layout name can be decided during parsing, is unique for each template globally across every TypoScript template and does not change when rendering. That's a LOT of restrictions. They're all gone in standalone Fluid - Layout can be dynamic during parsing, during rendering, in uncompiled and compiled templates.

Actions #8

Updated by Alexander Opitz about 8 years ago

  • Assignee set to Claus Due

So this issue is more a feature request which is solved for v8?
If yes, I would like to have this issue closed.

Actions #9

Updated by Wouter Wolters almost 8 years ago

  • Status changed from Needs Feedback to Closed

Feature is in now with the dependency to Fluid standalone in CMS 8

Actions #10

Updated by Claus Due almost 8 years ago

See https://github.com/TYPO3Fluid/Fluid/pull/107, Wouter's statement is technically not true - yet. It will be though when 1.0.8 is released and dependency is upgraded.

Actions

Also available in: Atom PDF