How can i use FLUID / extbase for preview at the backend of custom content elements TYPO3 >= 11 - typo3

How can I use FLUID / extbase for backend preview of custom content elements in the backend page module (TYPO3 >= 11) since the class "PageLayoutView" is deprecated (for example "PageLayoutViewDrawItem" hook)?
I know this new method, but it doesn't use FLUID and I have to write my own database queries (e. g. querybuilder):
https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/ContentElements/CustomBackendPreview.html
I don't understand if there is any way to get the same "magic" extbase stuff for the backend working like it does for the frontend (for one and the same content-element)?!

You can specify a Fluid template for the backend preview in the page TSConfig.
mod.web_layout.tt_content.preview.mycustomctype = EXT:myextension/Resources/Private/Templates/Preview/CTypePreview.html
If you want to render images in the preview, you need the vhs-ViewHelper "v:resource.record.fal".

Related

Call TYPO3 plugin from other plugin's body by cObject

I've injected plugin in the template to display specific data from the controller and it works fine. But now I have to make an AJAX call to receive some records based on the select filter from this specific plugin. I wanted to inject second plugin into this first plugin to the template to make a possibility to return data as a partial template to the frontend.
This is a typoscript file:
lib.firstPlugin =< tt_content.list.20.first_p
In the template I use cObject to render this first plugin:
<f:cObject typoscriptObjectPath="lib.firstPlugin"/>
It is even possible? How I can send AJAX call to receive only partial template from the backend (in this case some records) to the first plugin. I used similar code as above for the second plugin and it doesn't work (AJAX call will always go to the first plugin and default controller method).
Thank you for potential tips.

RTE in own backend module based on Extbase and Fluid

for a complex structure of a domain model (lots of fields and some relations) it´s planned to write an own backend module to be more flexible according to the structure and usability of that module. And there are some dependencies of some fields which I think I cannot make it just via TCA resp. FlexForms. So one thing I hope someone has done that before: If I build an own BE module with extbase and Fluid etc. and have forms with input fields or better textfields:
How can I add an RTE to such a field? Is that possible? I´ve read the TYPO3 Extbase book, but the example there do not contain a RTE.
in case you would like to use the same RTE as TYPO3 it is quite difficult to add all required scripts including the configuration of RTE to a field and I can't help you with that.
But I would like to remember you that in TYPO3 8 LTS the ckeditor becomes the new TYPO3 editor. So you may look forward to directly use it in your backend module or check out the docs of 8 LTS regarding the usage of it on own fields (if any docs exists yet).
http://ckeditor.com/

TYPO3: HTML template on multiple pages

I have installed TYPO3 and am working with a HTML template and markers to display content.
There is only one thing i am asking myself:
I have several pages with the same layout but different content and I only want to change parts of these contents.
Do I have to implement a specific template for every page to make this work or is there any other way?
(the red marked content shall be changed only)
I hope you got the point what I want to achieve and can answer my question.
there is a bootstrap introduction package that you can install (look at packages in the extension module)
https://typo3.org/extensions/repository/view/introduction
based on:
https://typo3.org/extensions/repository/view/bootstrap_package
there is no need for gridelements or DCE.
when you are a TYPO3 beginner, the introduction package gives you a good start because it stays close tho the TYPO3 'core' way of creating a website.
After you have learned how to create basic templates (with backend layouts & FLUIDTEMPLATES) you can deep into other extension like DCE or gridelements.
You can either create a template for each page or use one template for the whole content and then use some other extensions to create the grid view.
For this job the best extensions are:
dce - dynamic content element dce extensions
-- or --
gridelements gridelements extension

Typo3 7.2 Where to edit default templates + backend layouts?

Where do I edit default backend layouts that come with typo3 7.2 official introduction package? there is a table in the db that holds backend layouts but only those that I created, not the default ones. But where do I find the colPos layout for the default templates that already come with the installation? I only want to make slight modification in the html template and I'd like to make the changes editable from the backend.
Backend layouts are defined via PageTS below mod.web_layout.BackendLayouts.<key>. This is not a standard functionality, but a possibility provided by one of the integrated extensions.
The mapping of the backend layout ids to the template files is done in the actual TypoScript template at the path page.10.file.stdWrap.cObject.<key>.value.
For backend layouts created via the database, the key is the numeric id of the backend layout record.

Is it possible to use TemplaVoilà and Backend Layout on the same installation?

I have a TYPO3 4.7 environment which holds 3 websites.
All theses website use TemplaVoilà template engine.
We are now redesigning one of these site and I wonder if I can use Fluid and Backend Layout instead of TemplaVoilà.
It seems that I have to desactivate TemplaVoilà in the extension manager to be able to use be layout.
Dislaimer: I'm not using TemplaVoilà myself.
The TCA Overrides of EXT:templavoila replace the backend layout fields with the respecting fields of TemplaVoilà, see here.
By reading this code, it should be possible to have both the TemplaVoilà fields and the Backend Layout fields if
"Enable data structure selection" is inactive and
"Enable the classic Page module" is active
in the extension configuration in the Extension Manager.