Project

General

Profile

Actions

Bug #75201

closed

Extending bullets_type, imageorient, uploads_type, etc. not possible with FLUID STYLED CONTENT

Added by Philipp Faber about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-03-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I wanted to extend the bullets select field. It shows up, I can select it, but no output. Here is what I have so far:

PageTS (works):

TCEFORM.tt_content {
    bullets_type {
        addItems {
            10 = Un-bulleted List
        }
    }
}

FSC Bullets.html (no output):

<f:case value="10">
    <ul class="no-bullet">
        <f:for each="{bullets}" as="bullet">
            <li>{bullet}</li>
        </f:for>
    </ul>
</f:case>

Same behaviour for TCEFORM.tt_content.imageorient, TCEFORM.tt_content.uploads_type, etc.

Regarding bullets, it looks like only values 0, 1 and 2 are processed:

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid_styled_content/Configuration/TypoScript/Static/setup.txt#L22-L55

Actions #1

Updated by Riccardo De Contardi about 8 years ago

  • Status changed from New to Needs Feedback

Regarding bullets, solution is easy, then: looking at the Typoscript code you posted: simply add:

tt_content{
  bullets {
    dataProcessing {
      30 = TYPO3\CMS\Frontend\DataProcessing\SplitProcessor
      30 {
        if {
          value = 10
          equals.field = bullets_type
        }
        fieldName = bodytext
        removeEmptyEntries = 1
        as = bullets
      }
    }
  }  
}

I guess that the other cases are similar

Actions #2

Updated by Philipp Faber about 8 years ago

well, that's good. But this way I have to manually extend my TS everytime I want to add another layout. Could this not be automatic? The way data.layout works for example? Does that make sense?

Actions #3

Updated by Riccardo De Contardi almost 8 years ago

Phillip, I think that the problem is that (I still talk about "bullets") you are storing the values inside the bodytext field, and you must tell TYPO3 how to process them using the splitprocessor.

I guess that the code I wrote could be simplified using something like:

tt_content{
      bullets {
        dataProcessing {
            10 {
                if {
                    value = 0,1,10
                    isInList.field = bullets_type
                }
            }    
        }
    }
}    

or

tt_content{
      bullets {
        dataProcessing {
            10 {
                if {
                    value = 2
                    equals.field = bullets_type
                                        negate=1
                }
            }    
        }
    }
}

Actions #4

Updated by Philipp Faber almost 8 years ago

ok will try it and report.

Actions #5

Updated by Riccardo De Contardi over 7 years ago

  • Status changed from Needs Feedback to Closed

No feedback since 90 days > closing this issue.

If you think that this is the wrong decision or there is more work to do on it, please open a new issue with a reference to this one.

Thank you

Actions

Also available in: Atom PDF