0

カスタム コンテンツ スライダーを統合したい。したがって、私はドキュメントを読みました: http://docs.typo3.org/neos/TYPO3NeosDocumentation/IntegratorsCookbook/IntegratingJavaScriptSlider.html

これはスライド配列をレンダリングするはずだと思います:

<!-- Wrapper for slides -->
{carouselItems -> f:format.raw()}

私の質問は、単純なスライドをどのようにレンダリングできるかです。Slide には、任意の NodeTypes を含めることができます。この例では、画像のみがレンダリングされます。しかし、私は任意の NodeType にアクセスする必要があります。

Html (サイト/Vendor.Site/Private/Templates/TypoScriptObjects/CarouselItem.html)

{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
<div{attributes -> f:format.raw()}>
    <f:if condition="{image}">
            <f:then>
                    <media:image image="{image}" alt="{alternativeText}" title="{title}" maximumWidth="{maximumWidth}" maximumHeight="{maximumHeight}" />
            </f:then>
            <f:else>
                    <img src="{f:uri.resource(package: 'TYPO3.Neos', path: 'Images/dummy-image.png')}" title="Dummy image" alt="Dummy image" />
            </f:else>
    </f:if>
    <div class="carousel-caption">
            <f:if condition="{hasCaption}">
                    {neos:contentElement.editable(property: 'caption')}
            </f:if>
    </div>
</div>

編集

私のコンテンツ スライダーには、次の DOM 構造があります。 jkslide div 内のすべてのものは、スライダーとは関係ありません。

<div class="jkslider">
    <div class="jkslide">
        <p>The first slide element could be an image with a header underneath</p>
        <img src="layout/wallpaper-1-1600-900.jpg">
        <h2>Wallpaper 1, Width: 1600, Height: 900</h2>
    </div>
    <div class="jkslide">
        <div class="row">
            <div class="span6>
                <p>First column text</p>
            </div>
            <div class="span6>
                <p>Second column text</p>
            </div>
        </div>
    </div>
    <div class="jkslide fade">
        Some Text<br>
        <div class="someclass2">
            <div class="somelcass3">
                  Text
            </div>
        </div>
    </div>
</div>

1 つのスライド アイテムは次のようにレンダリングする必要があります。

<div class="jkslide">
    Here i want to print the raw node type / content collection? 
</div>

そのコードで、スライド アイテムを取得します。

sliderItemArray = ${q(node).children('sliderItems').children()

だから今、私はこれらの子供たちを表示する必要があります。ただし、子はイメージから通常のテキスト、または 2 列の要素まで、何でもかまいません。

私の問題をもう少しうまく説明できたことを願っています。

4

1 に答える 1