I have yet another question regarding translations of FCE elements in TYPO3.
The Problem:
I have a FCE Container that can hold several items. The container and the items have translations.
When I add or remove another item to the original container, I have to add/remove this item to all the translations as well. This is pretty annoying, because I want to show the same items in all translations.
Now what I want to do is change the output of my FCE so that always the items of the original container are shown.
This is the TS of a standard content field in T3, maybe someone can rewrite this:
10 = RECORDS
10.source.current = 1
10.table = tt_content
Edit your FCE
Then Select [All] in language:
Related
I have always used the extension Gridelements for my pages. Now I want to get away from using extensions for FCE. Is there a way with FLUID and Flexforms or similar to implement that as with gridelements?
For example, a bootstrap DIV "row" that contains a two-column element.
You could make a content element which contains 2 rows and which can have IRRE tt_content elements. I think there are enough examples how to make own content elements.
Additional for inline tt_content within tt_content records:
in SQL make a couple extra columns for tt_content 2 for the content and 2 for the foreign key
use a dataprocessor in typoscript to retrieve the IRRE tt_content records
use overrideChildTca in TCA/Overrides/tt_content.php to set the colPos to 99 or so for the inline IRRE record fields (else the content elements will appear double on the page).
set in the backend layout configuration of your main templates a fake column with colPos 99 to avoid TYPO3 9.5 warning that the inline content elements are not in a used column
Not sure if this is the best approach, but it will work. I guess you could also make it multidimensional by having inline in inline elements so you could make x columns. However I would just use Gridelements.
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.
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.
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
I have a main form called fm_Main. This fm_Main contains an embedded view which has 2 actions: Add & Delete. When I click Add is opening another form called fm_Second and here I can add some fields which will be displayed on the embedded_view on fm_Main.
The problem is: Let say I have 3 documents. All of them contains an empty embedded view. If I add some value fields in one document into the embedded view and then I save that document, all the 3 documents contains that values into the embedded. It should be: just one of them should cotain because I modified only one, the 2 of them shoudn't have that values displayed in the embedded view. Thank you!
PS: Also if I saved one document with an entry into the embedded view. When I want to create another new document, in the embedded view there exists the last entry from the last document. I want to be empty!
You must filter the embedded view to only show the entries related to the currently open main document.
Most programmers would use the UniversalID of the main document, it can be automatically populated into the entries you create.
One thing to think about is that you may want to store the Universal ID in a computed when composed field on teh main document. If you get a replication error in the future, the Universal ID may change, and you will not be able to get to the entries in the embedded view.
I been doing exactly this in several large Notes databases, works perfectly fine.
Expanding on Karl-Henry's suggestion, you should make into a categorized view and use the Show Single Category feature of the embedded view. I might suggest using the #Unique function instead of the UNID to relate the Main and Second documents, but that's a matter of preference. In either case, you have to make sure that the value inherits down into a field in the Second docs, and you can use that field as the category for the view.