2017-11-28 29 views
0

TYPO3 6.2에서 TYPO3 7.6으로 업데이트했습니다. 이제 새로운 tx_news - 데이터 레코드 -> 헤드 라인 및 기타 필수 입력란 만 삽입 -> & 저장을 새로 삽입합니다.tx_news의 새 데이터 레코드에서 서식있는 텍스트 편집기 (htmlarea)의 TYPO3 빈 문자

미리보기 (프론트 엔드)에서 다른 텍스트 필드 (htmlarea richt-text-editor)에서 내 항목뿐만 아니라 '빈 문자'도 볼 수 있습니다. 내 경우에는 'Teilnahmemodalitäten'. 필드는 2 자로 미리 채 웁니다. <f:debug>{newsItem.eventParticipationModalities}</f:debug>을 삽입하면 화면이 표시됩니다. prefill with 2 chars inside the rich text editor

여기에서 백엔드에서 볼 수 있습니다. 이다 커서 라인 3에 : 필드가 비어있는 경우 나, 헤드 라인을 보여주고 싶지 않기 때문에 나는 조건을했습니다 rte not empty

.. 하지만 내 텍스트 필드는 기본적으로 비어 있지 않은 이유 ?

<f:if condition="{newsItem.eventParticipationModalities}"> 
    <div class="press-info"> 
    <h3>Teilnahmemodalitäten</h3> 
    <f:format.raw>{newsItem.eventParticipationModalities}</f:format.raw> 
    </div> 
</f:if> 

이 필드 'Teilnahmemodalitärten은'tx_news에 대한 추가 필드입니다.

'event_participation_modalities' => array(
    'exclude' => 0, 
    'label' => 'LLL:EXT:.../locallang.xlf:news.event_participation_modalities', 
    'config' => array(
     'type' => 'text', 
     'enableRichtext' => true, 
    ), 
    'defaultExtras' => 'richtext' 
), 

및 ext_tables.sql : 나는 TYPO3 6.2의 문제는 ... 내가 무엇을 할 수하지 않은

CREATE TABLE tx_news_domain_model_news (
    ... 
    event_participation_modalities text NOT NULL, 
    ... 
) 

여기 내 ext_tables.php이야? 당신의 도움을 주셔서 감사합니다.

답변

1

이 같은, 당신의 가치를 트림하는 VHS:TrimViewhelper을 사용해야합니다

{namespace v=FluidTYPO3\Vhs\ViewHelpers} 
<f:if condition="{newsItem.eventParticipationModalities -> v:format.trim()}"> 
    <div class="press-info"> 
    <h3>Teilnahmemodalitäten</h3> 
    <f:format.raw>{newsItem.eventParticipationModalities}</f:format.raw> 
    </div> 
</f:if> 
+0

안녕하세요 마리오. 귀하의 게시물을 가져 주셔서 감사합니다. 나중에 귀하의 답변을 테스트하겠습니다. 그러나 이것이 해결책 일 수 있다고 생각합니다. 그러나 RTE가 왜 이미 2 개의 문자를 가지고 있는지도 모릅니다. https://fluidtypo3.org/viewhelpers/vhs/master/Format/TrimViewHelper.html – user2310852

+0

안녕하세요, 미안하지만 나도 몰라요. –