[TYPO3-english] Re: Panel in TYPO3 ver. 6.2.1 Bootstrap 3

Thomas Petersen tp at codem.dk
Mon May 5 15:06:19 CEST 2014


Hi.

I think im almost there about how to fix this.

At the Path /www/typo3conf/ext/bootstrap_package/Configuration/ContentElements/Bootstrap
I have a Panel.ts file, if I make a copy of it and call it PanelInfo.ts and have this code in it.
tt_content.bootstrap_package_panelinfo = COA
tt_content.bootstrap_package_panelinfo {
    10 = FLUIDTEMPLATE
    10 {
        file = {$plugin.bootstrap_package_contentelements.view.templateRootPath}Bootstrap/PanelInfo.html
        partialRootPath = {$plugin.bootstrap_package_contentelements.view.partialRootPath}
        layoutRootPath = {$plugin.bootstrap_package_contentelements.view.layoutRootPath}
    }
}

Then I have this path /www/typo3conf/ext/bootstrap_package/Resources/Private/Templates/ContentElements/Bootstrap
If i here also tage the panel.html file and copy it to PanelInfo.html with this code in it. (I have added an extra class name)
{namespace bk2k = BK2K\BootstrapPackage\ViewHelpers}
<div class="panel infos panel-{bk2k:contextualClass(code: data.layout)}">
    <f:if condition="{data.header}">
        <f:if condition="{data.header_layout} == 100">
            <f:else>
                <div class="panel-heading">
                    <f:switch expression="{data.header_layout}">
                        <f:case value="0">{data.header}</f:case>
                        <f:case value="1"><h1 class="panel-title">{data.header}</h1></f:case>
                        <f:case value="2"><h2 class="panel-title">{data.header}</h2></f:case>
                        <f:case value="3"><h3 class="panel-title">{data.header}</h3></f:case>
                        <f:case value="4"><h4 class="panel-title">{data.header}</h4></f:case>
                        <f:case value="5"><h5 class="panel-title">{data.header}</h5></f:case>
                    </f:switch>
                </div>
            </f:else>
        </f:if>
    </f:if>
    <f:if condition="{data.bodytext}">
        <div class="panel-body">
            <f:format.html>{data.bodytext}</f:format.html>
        </div>
    </f:if>
</div>

Then I have this TS file on the path /www/typo3conf/ext/bootstrap_package/Configuration/PageTS/modwizards.ts
Here I add the code under the MAIN panel code.

		   bootstrap_package_panelinfo {
                        icon = gfx/c_wiz/regular_header.gif
                        title = LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:content_element.panelinfo
                        description = LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:content_element.panel.description
                        tt_content_defValues {
                            CType = bootstrap_package_panelinfo
                        }
                    }

I now get an icon in the "New Content Element" TAB Bootstrap.
But if i want to use it i get an "INVALID VALUE (bootstrap_package_panelinfo) so there must be a 4. place i need to changes something, but can't find it atm.


More information about the TYPO3-english mailing list