1

I am pretty new to Typo3, Fluid etc. and I can't solve the following problem: I don't want fluidcontent_core to render the headline of my customized content element. Therefore I created a new template with an appropriate layout but the headline gets still rendered. I've been looking for a while now and can't find my mistake. It would be really nice if someone can help me!

I've already added the layoutRootPath and the templateRootPath to the fluidcontetn_core plugin. In the template where the CE is added I render the content with <v:content.render column="1" />

template of the customized content element:

<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers">

<f:layout name="Content" />

<f:section name="Configuration">
    <flux:form options="{group: 'Carousel'}" id="carousel" label="Carousel">
        <flux:grid>
            <flux:grid.row>
                <flux:grid.column name="Content" label="Carousel Content" />
            </flux:grid.row>
        </flux:grid>
    </flux:form>
</f:section>
<f:section name="Preview">
    <flux:widget.grid />
</f:section>

<f:section name="Main">
    <section class="kundenlist carousel slide frame" id="kundenlist" data-ride="carousel">
        <div class="carousel-inner">
            <flux:content.render area="content" />
        </div>

        <ol class="carousel-indicators visible-xs">
            <li data-target="#kundenlist" data-slide-to="0" class="active"></li>
            <li data-target="#kundenlist" data-slide-to="1"></li>
        </ol>

        <ul class="carousel-navigation hidden-xs">
            <li>
                <a class="left" href="#kundenlist" data-slide="prev">
                    <span class="icon-carousel-prev"></span>
                </a>
            </li>
            <li><span class="js-active-slide">1</span> / 2<!--bei dynamischer Generierung fix reinschreiben--></li>
            <li>
                <a class="right" href="#kundenlist" data-slide="next">
                    <span class="icon-carousel-next"></span>
                </a>
            </li>
        </ul>
    </section>
</f:section>

layout of the customized content element:

{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=FluidTYPO3\Vhs\ViewHelpers}

<f:layout name="Content" />
<f:if condition="{settings.content.settings.container.addAnchor}">
    <a name="c{record.uid}"></a>
</f:if>
<v:tag name="{v:variable.get(name: 'settings.container.types.    {record.CType}') -> v:or(alternative: settings.container.types.default)}"
    class="{settings.content.settings.container.className}">
    <f:render section="Main" />
</v:tag>
mLe
  • 73
  • 8
  • In your code, I see you render grid CE, so if I understand then might you want hide default header like: http://screencast.com/t/8YPkMAwS or describe your question more so I can help you :) – Ghanshyam Gohel Mar 17 '16 at 11:17
  • Thanks for your reply! A few more context: I want to build a carousel. The template above is the carousel container. In this container I add carousel items which are the child elements. I think a grid is the only option for this, isn't it? Now I want that neither the headline of the carousel (container) nor the headline of the item (childs) get rendered. I hope this description helps for understanding my problem :) – mLe Mar 17 '16 at 13:20
  • If you want to carousel then don't use grid as a container of carousel. You can create CE for carousel using section - object. If you want what I describe then I will put carousel code in answer? – Ghanshyam Gohel Mar 17 '16 at 13:37
  • and One error I see in your code: Your grid column name "Content" capital "C" and you render area with small "c" area="content" might be that the issue. – Ghanshyam Gohel Mar 17 '16 at 14:01

1 Answers1

0

CE Carousel example:

<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers">

<f:layout name="Content" />

<f:section name="Configuration">
    <flux:form options="{group: 'CE'}" id="carousel" label="Carousel">
        <flux:form.section name="carouselsec" label="Carousel">
            <flux:form.object name="carouselobt" label="Add new">
                <flux:field.file name="image" uploadFolder="uploads/tx_fluidcontent/" label="Upload image" allowed="jpg, jpeg, png, gif"  showThumbnails="1" />
                <flux:field.input name="link" label="Page link" >
                    <flux:wizard.link />
                </flux:field.input>
            </flux:form.object>
        </flux:form.section>
    </flux:form>
</f:section>

<f:section name="Preview">
    <h2>Carousel</h2>
</f:section>

<f:section name="Main">
    <section class="kundenlist carousel slide frame" id="kundenlist" data-ride="carousel">
        <div class="carousel-inner">
            <ul> <!-- Your Carousel HTML structure -->
                <f:for each="{carouselsec}" as="carouselList" iteration="Iteration">
                    <li>
                        <f:link.page pageUid="{carouselList.carouselobt.link}">
                            <f:image src="uploads/tx_fluidcontent/{carouselList.carouselobt.image}" width="150c" height="150" alt="carousel" />
                        </f:link.page>
                    </li>
                </f:for>
            </ul>
        </div>
        <ol class="carousel-indicators visible-xs">
            <f:for each="{carouselsec}" as="carouselList" iteration="Iteration">
                <li data-target="#kundenlist" data-slide-to="{Iteration.index}" class="<f:if condition='{Iteration.index}==0'>active</f:if>"></li>
            </f:for>
        </ol>
        <ul class="carousel-navigation hidden-xs">
            <li> <a class="left" href="#kundenlist" data-slide="prev"> <span class="icon-carousel-prev"></span> </a> </li>
            <li><span class="js-active-slide">1</span> / 2<!--bei dynamischer Generierung fix reinschreiben--></li>
            <li> <a class="right" href="#kundenlist" data-slide="next"> <span class="icon-carousel-next"></span> </a> </li>
        </ul>
    </section>
</f:section>

Useful links

Ghanshyam Gohel
  • 1,264
  • 1
  • 17
  • 27
  • Wow, thank you very much!! I thought using grid is the right decision because my carousel items are CE's again (some text with an image). Is there any "best practice" when I use grid or section- objects? – mLe Mar 17 '16 at 14:23
  • I used section - object for multi content, so our client/user/admin don't have confuse to use two CE for one carousel. so this is best practice as my opinion :) – Ghanshyam Gohel Mar 17 '16 at 14:33
  • Thank you for your help and advice :) I implemented your code and it works fine, but the headline gets still rendered: http://www.screencast.com/t/JEIV54bD Is there any possibility to hide this headline at this position? I need to render the headline somewhere else.. – mLe Mar 17 '16 at 15:03
  • in header type there is one option "hidden" did you check it? http://screencast.com/t/8YPkMAwS – Ghanshyam Gohel Mar 17 '16 at 15:09
  • I don't have this option, my backend looks like this: http://www.screencast.com/t/eR1P9ZuuklX8 – mLe Mar 17 '16 at 15:47
  • make sure in your pageTSconfig donot hide or remove/disable header like TCEFORM.tt_content.header_layout.removeItems for hidden you can add typoscript in your pageTSconfig: TCEFORM.tt_content.header_layout.addItems.100 = Hidden – Ghanshyam Gohel Mar 17 '16 at 16:06
  • hm I don't have any TS with tt_content or fluidcontent_core except: `plugin.tx_fluidcontentcore { view { layoutRootPaths { 10 = EXT:plan2netweb/Resources/Private/Layouts } templateRootPaths { 10 = EXT:plan2netweb/Resources/Private/Templates/Content } } }` – mLe Mar 17 '16 at 16:43
  • really embarrassing...I forgot to include fluidcontent_core in the template (under Includes) -.- However, thanks a lot for your support! – mLe Mar 17 '16 at 17:49
  • sometime it's happened :) it's my pleasure to help out. If my answer helps you, Please accept my answer :) – Ghanshyam Gohel Mar 17 '16 at 18:19