HOWTO add new tab and fields to tx_news - typo3

Hi my problem is that I need to do a new extension depending on tx_news.
I want to add a TAB to the plugin options (after template tab) with some fields
I looked for the solution, but I can find only instruction to add a new field within the news record, but not for the plugin options.
typo3 v9.5 + tx_news v 7.x+

Until now there is no mechanism to add fields to the flexform definition which makes up the plugin options.
So you have to provide a complete flexform definition where you still use the old definition. that will break if the original extension changes it's flexform (and change something evidently).

Related

TYPO3 : Adding plugin to page using the code

As a beginner with TYPO3 CMS in a new job, I had to make a new extension with differents plugins with a new table called "Products" and make the migration between the old products system and the newest one.
The goal of this was to adding automatically my plugin into the webpages using the code (no other solution, literally too much page to adding my plugin by hand).
I tried adding the reference of my plugin in the list_type field in my tt_content but unfortunately it doesn't work.
My question is: "Which fields I have to fill in in order to adding my plugin into my page?"
If you have been following common plugin registration your plugins will be in tt_content with CType: list and list_type: <extensionkey>_<pluginkey> (without any other underscores - for the linked example that would be exampleextension_list).
Some Background: TYPO3 (or rather TypoScript CONTENT, the base of all rendered content) then draws the rendering configuration from TypoScript setup in tt_content.list.20.<list_type>. In your case that will hold an entry point to render an Extbase action.
Required fields for your plugin in tt_content: pid, colPos, CType, list_type. If you used a Flexform for the plugin settings, also pi_flexform.
If you need something else, it is easiest to find out by adding your plugin via the backend and inspect the newly added DB record in tt_content afterwards.
Hints for debugging (I assume TYPO3 v9+):
Set TYPO3's application context to 'Development' by setting the environment variable TYPO3_CONTEXT=Development - this will show you the tt_content column names in the backend forms.
Set FE/debug = 1 (in LocalConfiguration.php or via InstallTool/Settings/Global Configuration) - this will show warnings in the frontend if your plugin configuration could not be found.

How to remove an entry out of $GLOBALS['TCA'] (Table configuration array) in the Backend in TYPO3

I want to remove an entry in the select field in the plugins section of TYPO3. Basically where on can pick the list_type. I'd like to remove one. When I open the Configuration in the TYPO3 backend I see that all the configured extensions listed in:
$GLOBALS['TCA']['tt_content']['columns']['list_type']['config']['items']
But how can I remove an entry of this array now in my Editor (PhpStorm)? I can't find the entries in the TCA/Overrides/tt_content...
Any help or hints are appreciated!
Best
If you want to remove content element types (Ctypes) for editors, you could use Page TSConfig or User TSConfig. Add this to your backend user group or to the page (in the page properties Resources / Page TSConfig):
TCEFORM.tt_content.CType.removeItems := addToList(textpic,bullets,table,uploads)
This removes the element "textpic,bullets,table,uploads" in the backend for tt_content records.
TCEFORM.tt_content.list_type.removeItems := addToList(my_pi1,my_pi2)
But in addition to this you should also study the documentation for MOD pageTSconfig, specifically the section about the new content wizard. Remember that removing an empty from TCA is far, far from enough to remove the corresponding meta configuration from all places. You will also create pageTSconfig and TypoScript setup by registering a plugin and this setup may also need to be removed.
https://docs.typo3.org/typo3cms/TSconfigReference/8.7/PageTsconfig/Mod/Index.html#new-content-element-wizard-mod-wizards-newcontentelement
The easiest way if this is one of your own plugins and you don't need it at all: avoid registering it. One way to do so is to make a condition for whether or not to register the plugin and control this with a toggle (ENV, context, extension config, etc.)
When you register a plugin in TYPO3 it creates quite a bit of configuration in addition to adding the items to either the CType or list_type selectors depending on registration method. This other configuration is as important as the TCA item.

Is it possible to configure the wizard in TCA so that I can create a new particular plugin?

How can I create a custom wizard in TCA so that, I can click on add button to create a particluar specific plugin on a page? my TYPO3 Version is 7.6.
click on the image. There is a add button
You can make a custom wizard on your own or use an existing one. Here you can find examples of existing ones and an example to create a custom one: https://docs.typo3.org/typo3cms/TCAReference/7.6/AdditionalFeatures/WizardsConfiguration/Index.html#user-defined-wizard-processing-with-php-function
Note this code area has been rewritten with core v8 - much more powerful 'wizards' are possible, called 'node expansion' and they come with a better API. For details see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/FormEngine/Rendering/Index.html#node-expansion and the according sections from TCA Reference for details.

TYPO3: tx_news add system category selection to a link

I'd need custom buttons (with image) for the various categories, and I'm trying to figure out if I can add the selection to the link for a header or in the RTE with the wizard.
So I link to the list page that should display only the entries tagged with the specific system category that was clicked, like with a category-menu directly as plugin -> category menu
In TYPO3 8 the linkHandler configuration has been improved alot. It allows you to define your own tabs in the link wizards for selecting any records. You may use this function to sys_categories inside the linkwizard and then configure the url to make it work with tx_news.
Check out the new feature here: https://usetypo3.com/linkhandler.html
EDIT: I guess this feature was already available in TYPO3 7 LTS but I'm not sure its not inside the documentation... not even in the docs of 8 LTS...

TYPO3 7.6. change typoscript hierarchy via extension-template

Is there a possibility to change the typoscript template hierarchy via an extension-template? Currently i have defined everything including all typoscript in my extension. This works fine with real_url configuration etc. But everything regarding indexed_search is overwritten by the original extension itself.
Is there a possibility to define the loading/parsing order of extensions?
Thanks!
You need to define a dependency to all extensions that should load before your extension.
If you do not have a hard dependency, then make sure to list the extension as suggested, because this will make that it is loaded before your extension too.
Open the TypoScript record, switch to the tab "Includes", at the bottom you will find the field Static Template Files from TYPO3 Extensions:. Select the value Include before all static templates if root flag is set.
Question is a duplicate of Manage hierarchy / enforce priority of TS-templates