How to wrap FCE container with link? - typo3

I have an FCE (Flexible Content Element) that has a container ROOT as usual and I want to wrap it with a link from a "link field" inside the FCE.
The issue is that the "Container for Elements" data structure doesn't have the field "Custom stdWrap" so I'm not able to easily add typolink.parameter.field = field_link.
So how can I wrap the main div (mapped by Container for Elements) in a <a href>|</a> using as link one of the link fields inside the FCE?
And I'd like to integrate this in the FCE itself not adding external typoscript.
Image of the templatevoila mapping. I wish to wrap the container ROOT with a <a href></a> using as link the URL element's value.

You cannot link the root element of a FCE There are a couple of workarounds.
First you could define a MAPPED link, that creates a a tag in html inside the fce. Stretch the a tag so that it matches the dimensions of the wrapping root. This is a pure css solution. The a tag has to be positioned within its container absolutely to acomplish this.
For the other solution you need TWO FCE. One containing the link and an content element. The field you mapped as content element will hold your second fce with background image, text and caption.

Related

TYPO3 Bootstrap Package: Picture smaller / adding picture layout

I'm using the TYPO3 bootstrap package. The picture in a content element is always 100%. I would like to get the picture smaller (fixed at 20px). First I thought of using TSConfig to adjust the size. But this doesn't work because I have images I would like to still have 100%. So I think the best way is creating an additional content element layout. How can I add a new dropdown entry?
You can add items to every dropdown list with TSConfig. In your case you want to extend table tt_content and field layout.
TCEFORM.tt_content.layout.addItems.1525215969 = Your layout name
The number can be any number you want. It just has to be unique.
See the official documentation for details.

How to show full content of <style> element in devTools?

When I am inspecting elements there are styles applied which are generated by webpack dev server and pasted in <style> elements. But when I try to inspect how those styles look like I am getting just partial content of that element.
How could I see the whole content?
I tried to find it in "view page source", but those style elements are added dynamically so they are not present in page source.
Only option I found so far is to click on style element, so it is selected. In console, let print content to console $0.innerHTML. $0 is reference to latest marked html element in Elements tab.
Store style element as a global variable, then assign it innerHTML to a variable and show it in console. I was able to copy full 25kB contents of style tag
image to help

Typo3, set title for Mask Elements

I have a typo3 server and using the mask extension. When an editor creates a new mask element, there isnt a title in the list view. Its always "no title":
I checked the database and found the titles in the db in the field: tt_content.header but no way to set them automatically oder manually by an editor. Anyone have an idea how the title can be set automatically? Oder manually by an editor?
ext:mask has the option to reuse existing fields of tt_content for new kinds of content elements (CEs). use it to get the bonus of better interoperability with TYPO3.
TYPO3 has a logic how to show records (content elements) in the backend. one of it is the usage of the fields header and description. if you reuse these fields your CEs will look like others automatically.
If you use other fields you need to declare your fields for usage AND in case you change the kind of a CE from your kind to e.g. TEXT with Media the header stays.
Especially header is handled in the layout/partial of FSC or CSC global for any kind of CE. if the handling/rendering is changed (e.g. special layout) in an installation your CEs need special effort if they have their own building of the header.
Try to use the same fields as existing CEs and your life can be easier.
I'm having the same issue, but I found a way around it for the meantime. I edit the mask element and chenge its type to something elseโ€”like Textโ€”where I can set the title. After typing the title I save it, then change back to mask element and save again. This works by me without losing the content of the mask element. This way I can see the title in typo3 backend when I view as list or page or add content from another page. As I said, it doesn't solve the problem, but can help until there is a proper solution.
EDIT
I've just found another solution. You can add the title field to en existing mask element. To do it, go to ADMIN TOOLS > Mask, click your mask element to edit it. Add a new item by dragging the ๐—ฆ๐˜๐—ฟ๐—ถ๐—ป๐—ด item (the one on top of the list of available items) to the right where your items are. Then in General under ๐—–๐—ต๐—ผ๐—ผ๐˜€๐—ฒ ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ dropdown choose an ๐—˜๐˜…๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ด named:
๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ: (๐—ต๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ)
Save, close, go to your page to add your title. This still doesn't add the title field automatically to all mask elements, but it is a step forward.
If anywhere, you should be able to set a static title automatically in your page tsconfig. You could to something like
mod.wizards.newContentElement.wizardItems.mask.elements.[title of your mask element].tt_content_defValues {
header = My Awesome title
}
Personally, I usually give every mask element a header field and ask content editors to fill it in.
See also this discussion on Mask elements and backend titles.
Hope, this helps.

Equivalent of sectionIndex in Neos

In TYPO3, if I need to create a menu for the different elements inside a page, I use the sectionIndex property. With Neos, how can I build a navigation for the elements inside a page?
I don't think you can, right out of the box.
That would require all elements on the page that you want to link to to have an ID attribute. In TYPO3 CMS all of the elements rendered with css_styled_content had one.
However there are multiple ways to do it with custom content elements. Like creating a section wrapper element with title and anchor id, wrap every section in such element and then create a custom content element that will look-up all of your section wrappers and make a list of anchor links pointing to sections.

Use the sitemap content element to load content of the referenced pages

I use the sitemap content element so that the editor can explicitly reference to individual pages in my page tree. Of course those pages do contain content elements (Textpic, Media, all the good stuff...) in their "normal" section. I need advice on how to modify the sitemap content element that it will output the content of the referenced pages.
I know there is already a plugin called "kb_sitemap" which basicaley does this job... but it does not handle the output of images or media (flash-, quicktime movies..) elements which is absolute necessary. The rendering relevant stuff is handled by Css Styled Content (CSC) which is necassary for me because it renders the media content element.
Do you use templavoila ?
Ok, go to page properties -> General tab (bottom part of the tab) and then you'll find all containers that possibly contain CEs, click to the lil folder icon and you may select content elements from any other page.
EDIT: added screenshot, page properties...
Note, showcase, maincontent, right content are just my names for my TV elements, could of course be name differently.