Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   Разработка расширений / TYPO3 extension development (http://forum.typo3.ru/forumdisplay.php?f=38)
-   -   DCE, FAL - кто сталкивался? (http://forum.typo3.ru/showthread.php?t=11823)

Dimanoss 31.08.2015 12:19

DCE, FAL - кто сталкивался?
 
День добрый, столкнулся с проблемой. Пытался поставить расширение DCE, всё работает, но в FE не выводится картинка (в BE всё ОК!). Пробовал на версиях 7.4 и 6.2, на разных серверах - без толку. При выводе переменных в дебаге вроде как - вместо массива картинок приходит текст.

Вопроса два:

1. Кто-нибудь сталкивался с подобным? Это мулечка FAL? Может, надо что-то доинсталлировать, модуля какого-ньдь не хватает?

2. Есть ли альтернатива DCE? Проекты зависли, начальство уже уволить грозится, счёт на дни пошёл. Нужно именно во флюиде свои заготовки контентэлементов по-быстрому клепать, чтобы они во FE в нужных контейтерах отображались и с нужными стилеклассами.

Николай Сипко 31.08.2015 13:07

"Во флюиде" не специалист, но, может, дело в замене css_styled_content на fluidcontent_core?
Текст с картинками fluidcontent_core не рендерит по определению:
https://docs.typo3.org/typo3cms/exte...dcontent_core/

"Special note about the Textpic (Text with Images) content type

As you may have already noticed, there is no template shipped for the TYPO3 core content type Textpic (Text with Images). The reason for this is as simple as it is opinionated: this particular content element type requires an inordinate amount of settings and rendering instructions to serve just the most common use cases. This is also evident in the TypoScript setup that is shipped with CSS Styled Content - the setup required to manage positioning and flow of images and text is so massive that in most sites you use only a fraction of the settings.

A decision was therefore made to simply not ship any template for this content type at all, as to not invite the inevitable explosion in complexity that happened in CSS Styled Content.

Our alternative recommendation is to create container elements which control the structure into which you then insert regular Text and Image elements. The result being more elements, but a much clearer separation of the types (which is useful for example in the context of site search with content type facets). You can of course also go one step further and create your own custom elements which use your own custom fields to define the text and image(s) which you render in a completely custom way".

Dimanoss 31.08.2015 13:22

Нет, от css_styled_content отказаться не получилось. Всё по старинке. Без TV, на fluidtemplate.

Николай Сипко 31.08.2015 13:28

Где-то читал, альтернатива DCE - flux.
Google в помощь.

Ивано++ 01.09.2015 12:38

Есть аналог: Content Designer
А так Extbase (builder) + Fluid - думаю для 6.2. лучше не будет.

Manas 01.09.2015 13:04

Если через FAL, в DCE нужно сделать вывод так

Код:

<f:for each="{dce:fal(field:'image', contentObject:contentObject)}" as="fileReference" iteration="iterator">
    <f:if condition="{iterator.isFirst}">
        <f:image src="{fileReference.uid}" alt="" treatIdAsReference="1" />
    </f:if>
</f:for>

Т.е. в цикле.
Если будет одна картинка можно и не юзать FAL, тогда

Код:

<f:image src="uploads/pics/{field.image}" width="100c" height="100c" alt="" />

Dimanoss 01.09.2015 15:52

Цитата:

Сообщение от Manas (Сообщение 39785)
Если через FAL, в DCE нужно сделать вывод так

Код:

<f:for each="{dce:fal(field:'image', contentObject:contentObject)}" as="fileReference" iteration="iterator">

не работает, т.к. {dce:fal(field:'image', contentObject:contentObject)} возвращает не массив, а строку со значением счётчика массива.

Manas 01.09.2015 23:51

Всё работает. В конфиге самого фала поменяйте имя переменной

Код:

<config>
        <type>inline</type>
        <foreign_table>sys_file_reference</foreign_table>
        <foreign_field>uid_foreign</foreign_field>
        <foreign_sortby>sorting_foreign</foreign_sortby>
        <foreign_table_field>tablenames</foreign_table_field>
        <foreign_match_fields>
                <fieldname>image</fieldname> <!-- Name of variable! -->
        </foreign_match_fields>


Dimanoss 02.09.2015 10:14

Цитата:

Сообщение от Manas (Сообщение 39789)
Всё работает. В конфиге самого фала поменяйте имя переменной

Код:

<config>
        <type>inline</type>
        <foreign_table>sys_file_reference</foreign_table>
        <foreign_field>uid_foreign</foreign_field>
        <foreign_sortby>sorting_foreign</foreign_sortby>
        <foreign_table_field>tablenames</foreign_table_field>
        <foreign_match_fields>
                <fieldname>image</fieldname> <!-- Name of variable! -->
        </foreign_match_fields>


по умолчанию в модуле стоит "fal"

Код:

<foreign_match_fields>
        <fieldname>fal</fieldname> <!-- Name of variable! -->
</foreign_match_fields>


Manas 02.09.2015 10:28

Да, меняйте fal на свое имя переменной. Я вас кусок своего кода кинул, где у меня имя = image


Часовой пояс GMT +4, время: 23:42.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot