Typo3 7.6 Flux backend layout column title - typo3

I created a basic template with the builder extension. In the page properties I set Backend layout to fuildpages and I see now in the backend the 2 columns that the builder extension created:
<f:section name="Configuration">
<flux:form id="standard">
<!-- Insert fields, sheets, grid, form section objects etc. here, in this flux:form tag -->
</flux:form>
<flux:grid>
<!-- Edit this grid to change the "backend layout" structure -->
<flux:grid.row>
<flux:grid.column colPos="0" colspan="3" name="main" />
<flux:grid.column colPos="1" name="right" />
</flux:grid.row>
</flux:grid>
</f:section>
<f:section name="Main">
<h1>I am a page template!</h1>
<p>
My template file is EXT:my_template/Resources/Private/Page/Standard.html.
</p>
<div style="float: left; width: 75%;">
<h2>Content main</h2>
<v:content.render column="0" />
</div>
<div style="float: left; width: 25%;">
<h2>Content right</h2>
<v:content.render column="1" />
</div>
</f:section>
But in the backend this columns don't have the names "main" and "right".
In typo3 6.2 this worked with the basic template the builder create. Do I miss something?
And an additional question: Is there a sysext for the default backend layout "Left" "Normal" "Right" "Border"? I wanted to watch there how it is done but I could not find it.

You need to set the label attribute on your <flux:grid.column/>-tags. The name attribute is only used to reference the column in other places, for example to render it using the <v:content.render/>-ViewHelper from EXT:vhs.
A note on translations of the column label: The label attribute can not contain usages of the <f:translate/>-ViewHelper, due to caching (GitHub issue). If you want to translate your column names, you need to provide the translation under some default key, which one that is is explained here.

Related

Create a popup inside a form

I want to include a popup inside a form. The normal way to do that is to have 2 forms like:
<div class="wrapper" >
<h:form>
<h:panelGroup id="id1" layout="block">
<ui:include src= content1 />
</h:panelGroup>
</h:form>
</div>
<h:form id="modalId">
<ui:include src= popupContent >
</ui:include>
</h:form>
and render with a button inside content1, the form "modalId" that contains the popUp.
I have the popup form in an external component that is included inside "content1". Due to the popup form is inside the other form,it isnt well rendered. How can I fix that? The idea is to use that component that is common for all my xhtml views
The way i was writing my own components was to rely on the existance of the external form. That is, i did not include any form elements inside the component.
If there was a need to reference the outer form element then i would just pass the from id as one of the attributes of the interface. Composite components are really useful for this kind of stuff:
<composite:interface>
<composite:attribute name="formId" type="java.lang.String" />
</composite:interface>
<composite:implementation>
<h:commandButton value="button" action="someaction">
<f:ajax execute="#{cc.attrs.formId}" render="#{cc.attrs.formId}" />
</h:commandButton>
</composite:implementation>
Then you include that in your outer form (assuming 'comp' is your namespace for composite components and 'modal' is the name of the file containing the component):
<h:form id="myForm">
<comp:modal formId="myForm"/>
</h:form>
Go through this tutorial if you are not familiar with them:
http://docs.oracle.com/javaee/6/tutorial/doc/giqzr.html

FluidTYPO3: How do I render content from other extensions (news...)?

Actually I found the answer already on this site
Preferred way to add an extensions into Fluid Powered TYPO3 template
but I don't get it to work :-(
I have a page template with main content and in the sidebar content from FlexSlider extension and at the bottom I want to render the list view of extension news. So I guess answer 1a from Claus will fit:
1a) create the element in a sys folder and reference it from your Flux form settings then use v:content.render to render it by UID.
but how is that done? How do I reference it from my Flux form?
Has somebody an example code. I couldn't find a tutorial or a documentation...
Thanks for reading and hopefully you have an answer ;-)
Jürgen
An easy way is to create a typoscript element and then render it in fluid:
lib.rightcolumn = CONTENT
lib.rightcolumn {
table = tt_content
select {
pidInList = 42
where = colPos=1
}
}
<f:cObject typoscriptObjectPath="lib.rightcolumn" />
Another way is to directly create it in fluid:
https://fluidtypo3.org/viewhelpers/vhs/master/Content/RenderViewHelper.html
Finally I got it accidentally by fixing another problem:
Fluid Powered TYPO3 FLUX Fluidcontent - No Output in Frontend?
I had to add the file "typo3conf/AdditionalConfiguration.php" with
<?php $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'] = array('fluidcontentcore/Configuration/TypoScript/');
Thanks for help nBar, I used "f.cObject" as workaround.
Now here is my Page/Template code:
<f:section name="Configuration">
<flux:form id="homepage">
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="0" colspan="2" name="main" label="Main content"/>
<flux:grid.column colPos="1" colspan="1" name="logoslider" label="Logo slider"/>
</flux:grid.row>
<flux:grid.row>
<flux:grid.column colPos="2" colspan="3" name="news" label="News"/>
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Main">
<div class="container">
<div class="row">
<div class="col-md-8">
<v:content.render column="0"/>
</div>
<div class="col-md-4 team_logos">
<div class="infobox">
<v:content.render column="1"/>
</div>
</div>
</div>
<div class="row infobox">
<div class="col-md-12">
<v:content.render column="2"/>
</div>
</div>
</div>
</f:section>

How to include a constant in a TYPO3 Fluid VHS menu

I have a simple menu generated by the Fluid Menu ViewHelper:
<v:page.menu useShortcutData="TRUE" levels="3" expandAll="1" class="menu" classActive="act" substElementUid="1" excludePages="12,13,3" />
There are multiple languages and each language has different pages hidden in the navigation that I would like to change in the "excludePages" part.
In Typoscript I would simply use a constants marker like {$exclude}. Adding the marker in fluid breaks the menu. What would be the way to achieve this in an inline Fluid setup like this?
There are different ways to get constant into Fluid.
1. Include form TypoScript
{f:cObject(typoscriptObjectPath: 'lib.myConstant')}
2. Save in settings from your ext.
plugin.tx_myext.settings {
myonstant = TEXT
myconstant = 1,2,3
}
3. Configuration in Page Template (the pure fluid way)
<f:section name="Configuration">
<flux:form id="mypage" options="{icon: 'Icons/Page/Standard.gif'}">
<flux:field.tree name="myConstantFromTRee" table="pages" parentField="pid" expandAll="0" multiple="1" minItems="0" maxItems="0" label="myConstantFromList" foreignLabel="title" size="10"/>
</flux:form>
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="0" name="main" />
</flux:grid.row>
</flux:grid>
</f:section>
And access it with {settings.myConstantFromTRee}.

FLUX configuration for a typolink

How can I use a typolink-field at my FLUX Flexform-Configuration (Backend)
<f:section name="Configuration">
<flux:form id="home" options="{icon: 'Icons/Content/myicon.gif', group: 'Homepage'}">
<flux:field.input name="txtHeadline" label="Headline" />
<!-- ?? -->
<flux:field.input name="lnkTarget" label="Link">
<flux:wizard.link />
</flux:field.input>
</flux:form>
</f:section>
Main Section:
{namespace v=Tx_Vhs_ViewHelpers}
...
<v:link.typolink parameter="{parameter: section.item.url}">Beautiful link</v:link.typolink>
<!-- or -->
<v:uri.typolink parameter="{parameter: section.item.url}" />
That's my first steps with FLUID Powered TYPO3 and I have no idea?
Thanks for your help. I need this input field and the link wizard for the 'normal' output: <a href="mylink" class="xy" />
Jost is right. You need to pass the value from the field to the TypoLink ViewHelper from VHS.
Being partially compatible with the TYPO3 CMS Core typolink function, you need to pass your field value as parameter.
Having a form field like:
<flux:field.input name="lnkTarget" label="Link">
<flux:wizard.link />
</flux:field.input>
Example with the plain contents of a field:
<v:link.typolink configuration="{parameter: lnkTarget}" />
Example with custom overrides/additions to the field value:
<v:link.typolink configuration="{parameter: lnkTarget, additionalParams: '&print=1', title: 'Follow the link'}">
Click Me!
</v:link.typolink>
Notice where I placed {lnkTarget}.
You can look those up in the DocComent Block on the ViewHelpers:
https://github.com/FluidTYPO3/vhs/blob/development/Classes/ViewHelpers/Link/TypolinkViewHelper.php#L22
https://github.com/FluidTYPO3/vhs/blob/development/Classes/ViewHelpers/Uri/TypolinkViewHelper.php#L22
Being one of the maintainers, if you need further feedback-please raise an issue on the Github project if you have problems using it or join us on IRC (#fedext on Freenode)
Now in 2021 (Typo3 10) use:
<flux:field.input name="linktarget" label="Link" config="{renderType: 'inputLink'}"></flux:field.input>
And
<f:link.typolink parameter="{parameter: d.job.linktarget}">Click Me!</f:link.typolink>

How to define forms in JSF primefaces with pe:layoutPane

I have a template layout with JSF 2 and primefaces and primefaces extensions layoutPane. The left side has an search area and a structure are. The right side is a details area.
Here a short form of the template:
<html>
<f:view contentType="text/html">
<h:head>
</h:head>
<h:body style="width: 100%; height: 100%;">
<pe:layout id="layoutId">
<pe:layoutPane id="layoutPaneWestId" position="west" size="30%" closable="false" resizeWhileDragging="true">
<pe:layoutPane id="layoutPaneSearchId" position="north" closable="false" resizable="false">
<h:form id="searchForm">
<ui:insert name="search" />
</h:form>
</pe:layoutPane>
<pe:layoutPane id="layoutPaneContentId" position="center">
<h:form id="structureForm">
<ui:insert name="content" />
</h:form>
</pe:layoutPane>
</pe:layoutPane>
<pe:layoutPane id="layoutPaneDetailId" position="center" size="70%" closable="false">
<h:form id="detailsForm">
<ui:insert name="details" />
</h:form>
</pe:layoutPane>
</pe:layout>
</h:body>
Each area has its own form. Now I ask myself what shall I do with the e. g. with a global p:growl. In which form should it be? Nested forms are invalid html as I know.
Another big problem is that when I type something in the search field in searchForm and click on an accordion panel in structureForm, the content of the search field is submitted. Why?
Kind regards
Oli
You should put your global p:growl in another form outside pe:layout.
The second problem could be related to some update invoked from structureForm to searchForm