Render headline of first content element in Grid Container different - typo3

Is it possible to render the headline of the first content element within a Grid Elements container different in the fluid_styled_content template or via TypoScript?

There are several virtual fields within cObj->data that are created during the rendering process of Gridelements. So you might want to check for keys with the prefix parentgrid_
Additionally you can use
data = cObj:parentRecordNumber
to get the position of an element within the rendering order. Since Gridelements uses the sorting field of tt_content for the rendering of children and the parentRecordNumbers are handled correctly between different container columns, you should get the correct value - 1 - for the first element of each column there.

Related

understanding the sapui5 form layout

I have picked a sample form xml view from demo kit and the link is :
Link to xml view
and the Change Form is like:
Here I don't understand why Address form container has 5 form elements and for Contact form container has 4 and then next elements starting from a new column (Mobile:)
Can any one brief how to understand the above query also to understand how to add any no of rows below form container?
Also How can I set Labels and Input fields for the same form side by side?
Any Help for this beginner is Appreciated!!
Here I don't understand why Address form container has 5 form elements and for Contact form container has 4 and then next elements starting from a new column (Mobile:)
As Address form container contains 5 form elements it is showing 5 form elements same applies to Contact form container which contains 4. You can add extra form elements to the Contact form container it will show 5 form elements.
Next elements starting from a new column because the form container is
responsive and it is written in different form containers(Address, Contact and Mobile).
How to add any no of rows below form container?
Kindly elaborate your question? if you are talking about the data binding, then there is an aggregation formContainers which helps to achieve it.
Also How can I set Labels and Input fields for the same form side by side?
Yes you can achieve it by giving empty label ie <f:FormElement label=""> and using <layoutData> for alignment for the elements. But the layout and CSS is predefined you need to modify it as per your requirement.

TYPO3 Insert records element: detect number of items

Is there any way to detect in fluid or typoscript (or anything else) if an "Insert Records" CE from fluid_styled_content contains one or multiple items?
The use case:
I use "insert records" to display contacts from a custom extbase extension on a page, and I'd like to get a different title and layout if there are one or several items.
Insert Records is rendered using the RECORDS content object. In \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::render() I see no option to read the number of items or the current item number that is rendered from the contentObjectRenderer object that renders a single item.

Sapui5 table column with various control template

I implemented a table which bound to a json model.
I want to manipulate it such as one of the column be with various control types depend on the row value.
For example with some condition some rows of same column has text view control and other has dropdown list control.
I attached a sample image:
Thanks in advance!
You could also just create your custom control that renders the control you want based on a property value.
I created a simple example for you: http://jsbin.com/cafumivuco/13/edit?js,output
This has the advantage that only one control is rendered per row and not both while one is invisible.

ExtJS - Add component at the bottom

So I want to add a component to the bottom of a panel. Normally you would just do the following:
Ext.getCmp('xxxx').add({....});
and that will add to the bottom, but for some reason when you add itemId it all goes to hell. Here is a working example: http://jsfiddle.net/Qsfgh/ Notice how the 'higher' id comes before the lower one. (You can open your console and look at the HTML if you want to verify) Even when I use an 'insert' and I insert it at the very end it still puts it at the beginning. How do I get around that?
Both the fields you're adding have the same itemId. ItemIds don't have to be globally unique, but they do have to be unique for components within the same container. The itemId is used as the key for a component in the owning container's mixed collection of items (if no itemId is set on the component, the id is used instead).
So when you are adding the second field, it replaces the first field in the container's collection of items and screws up the rendering process. Give the fields different itemIds and everything will work properly.
If you give each field a unique itemId you no longer need to absolutely position the fields. Field 2 will be placed correctly beneath Field 1

A treeview INSIDE OF a treeview? or how to show a list inside of a treeview

I have a treeview that lists the properties of an object. One of those properties is a list of Tags (strings) that can be a list of zero to whatever number of items. So you could tag a song with "Jazz" and "Favourite" and "Chillout" or whatever. At the moment I have these implemented as just a single string with commas separating each tag but I'd like a more intuitive user interface. All of the other properties are shown in a 2 column treeview where the first column is the property name and the second column is the property value.
It thought one way to do this would be to place another treeview inside the second column in the tags row where users can click a row to edit/delete it or there's be a "Add new tag..." row that lets them add new tags.
How could I possibly do this? Alternatively, any different GUI suggestions?
You cannot put widgets (GtkWidget) inside a column of a treeview. But you can pack several cells (GtkCellRendenderer) into a single column. A cell renderer is kind of like a lightweight widget. It can of course be subclassed so you can write your own if nothing else fits your needs.