TYPO3 7.6.15 cannot define rooth path for a custom partial - typo3

I created contact form in TYPO3 7.6.15 using standard form extension. I also created custom partial for it, and I defined it inside of my root template setup:
plugin.tx_form {
partialRootPaths {
20 = fileadmin/templates/ext/form/partials
}
}
Unfortunately it doesn't work and I am not sure why. I saw that the form extension for this TYPO3 version is still in beta phase...
Any help is greatly appreciated!
Denis

In the TYPO3 object browser, the paths to templates, layouts and partials are located in the object "view". So please try this:
plugin.tx_form {
view {
partialRootPaths.20 = fileadmin/templates/ext/form/partials/
}
}

Related

Typo3 9.5 UrlLinkHandler

I'm trying to use the UrlLinkHandler in Typo3 9.5. So far I've configured my Backend with TCEMain.
TCEMAIN.linkHandler.youtube {
handler = TYPO3\CMS\Recordlist\LinkHandler\UrlLinkHandler
label = Youtube
}
This works fine so far and I can add links within the RTE.
For rendering the Link in the frontend my Typoscript looks like this:
config {
recordLinks.youtube {
typolink {
wrap = test|test
}
}
}
But the frontend just shows a regular rendered anchor tag like Link.
Any hints what I'm doing wrong?
Oehm, you're mixing up different things... You register a new UrlLinkHandler for BE, but your recordLinks-block for FE is a part of the RecordLinkHandler.
If you want to have a link-type formatted in a special (like you described on typo3.net), then an own LinkHandler could be a solution.

Add a static template to my typo3 extension

I have created an extension with sitepackagebuilder.com and the idea is just to write some static html.
I know that when you have a controller you can call the templates by following the convention names. But what if you don't have a controller? What I need, at least for now, is just to install the extension, add the plugin into a page and get some static content in that page.
I can imagine that this is set in a typoscript file but I'm quite noob with all the typoscript thing.
I'm getting this error:
'No Content Object definition found at TypoScript object path "tt_content.list.20.heboorganigram_organigram"'
Until I define that object in my typoscript file. I have tried this.
tt_content.list.20.heboorganigram_organigram = PAGE
tt_content.list.20.heboorganigram_organigram.10 = TEMPLATE //(or FLUIDTEMPLATE same result)
tt_content.list.20.heboorganigram_organigram.10.template = FILE
tt_content.list.20.heboorganigram_organigram.10.template.file = fileadmin/Organigram.html
And then I don't get an error but I also don't get the content from my Organigram.html, this is just trying stuffs, I actually don't know if this is what I need to do.
Before creating new Content Elements you first have to create the Page Template, for that have a look at the sitepackage tutorial https://docs.typo3.org/m/typo3/tutorial-sitepackage/master/en-us/FluidTemplates/Index.html
If you already got the page template, have a look at https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/ContentElements/AddingYourOwnContentElements.html
Provided you already did the steps above, for getting the frontend output you are interested in the step Configure the frontend rendering
So the TypoScript should look something like this:
lib.contentElement {
templateRootPaths.200 = EXT:heboorganigram/Resources/Private/Templates/
}
tt_content {
examples_newcontentelement =< lib.contentElement
examples_newcontentelement {
templateName = NewContentElement
}
}
Then you need to place your Organigram.html file in the Templates Folder in inside the sitepackage.

TYPO3 (10.4) Felogin: Can´t change Template

i can´t change the Login.html template from the EXT:Felogin (10.4.4) in my TYPO3 (10.4.4 latest).
I tried everything.
I changed the path with typoscript in:
Backend (constants and setup)
In my sitepackage (constants and setup)
I even changed the path in the original extension in typo3/sysext/felogin
and nothing worked for me.
Did anybody managed it to changed the template?
In my case in Typo 10.4.6 (own Sitepackage = ***) this Setup works:
SETUP:
plugin.tx_felogin_login {
view {
templateRootPaths.10 = EXT:***/Resources_felogin/Private/Templates/
partialRootPaths.10 = EXT:***/Resources_felogin/Private/Partials/
}
}
Now i can edit Login.html
First it has to be verified which kind of template is used, as since TYPO3 version 10.2 there exist two different plugins and templates:
The old-style template which is using markers in the form ###MARKER###.
This template relies on the old plugin which is still based on piBase
The new fluid-based template is served by the new plugin which is based on extbase.
The switch between these two options is quite uncommon in the feature-settings resided, which can be found here:
The fe_login-setting I found in the very bottom of the modal-window which is opening after having clicked on the button "Feature Toggle":
If the button is activated and therefore shown green fluid-templates are used, else the old marker-template.
It still keeps to mention that the new plugin with fluid-templates inside the extension fe_login is not mentioned in the current official documentation but only in this CHANGELOG
Below I will show the solutions for fluid-templates.
Settings for Fluid-Templates
Enable fluid-templates like explained above if not done yet.
Add the TypoScript shown after the following image if it's missing (you can control it in the Template-Tools for TypoScript:
Take care that you have to switch there between constants and setup to find the correct values if existing.
TypoScript Constants:
plugin {
tx_felogin_login {
view {
# cat=Frontend Login/02_Template/102; type=string; label= Path to template root (FE)
templateRootPath = EXT:felogin/Resources/Private/Templates/
# cat=Frontend Login/02_Template/103; type=string; label= Path to template partials (FE)
partialRootPath = EXT:felogin/Resources/Private/Partials/
# cat=Frontend Login/02_Template/104; type=string; label= Path to template layouts (FE)
layoutRootPath = EXT:felogin/Resources/Private/Layouts/
}
}
}
TypoScript Setup:
plugin.tx_felogin_login {
view {
templateRootPaths {
0 = EXT:felogin/Resources/Private/Templates/
10 = {$plugin.tx_felogin_login.view.templateRootPath}
}
partialRootPaths {
0 = EXT:felogin/Resources/Private/Partials/
10 = {$plugin.tx_felogin_login.view.partialRootPath}
}
layoutRootPaths {
0 = EXT:felogin/Resources/Private/Layouts/
10 = {$plugin.tx_felogin_login.view.layoutRootPath}
}
}
}
tt_content.login < tt_content.felogin_login
Save the record or the files, depending where you added the TypoScript and afterwards in the Template-Tools you can open the constant-editor to add your own values there.
Check the paths and adjust them to your needs. A copy of the fluid-files has naturally to exist in the paths that are entered in the form. They can be adjusted later, but it's advisable to add a headline or some other text for testing if the templates are taken from the right directory.
After clearing the cache the website can be reloaded for controlling if the steps succeeded. If the original templates are shown check all paths and if the templates reside without changes perhaps already in the right directories, just in original form. If nothing or only the headline is shown check if you added a plugin of type login-form and add it on the right page and in the right col if missing.
It has to be expected that in TYPO3 version 10.4.5 or later everything is much easier and some steps here are just not required, like adding the TypoScript-Snippets - they will probably soon reside in the original setup for the extension.
It works here in a 10.4.3 installation:
TS (Setup):
plugin.tx_felogin_login {
view {
templateRootPaths.10 = EXT:sitepackage/Resources/Private/FeLogin/Templates
partialRootPaths.10 = EXT:sitepackage/Resources/Private/FeLogin/Partials
}
}
And place your file in
sitepackage/Resources/Private/FeLogin/Templates/Login/Login.html
The following answer is not correct but includes some links that might be of interest. For a step-by-step-description look for my second answer on this page.
That seems being broken for me in the moment, I tried it out like you without success.
If an individual file-path is entered, the original template is not loaded anymore but the configured file neither.
I found two issues in the bugtracker that seem somewhow related:
Bug #90953: Add missing view path definition for felogin
Task #90566: Provide examples of how to customize / extend the extbase plugin
Its possible that there are still other issues reported related to it, but I never found any on a quick search. First step would be to search here:
Forge issues, category fe_login
second step would be to rermove or change the search filter.
Finally you still can file a new issue, even without searching too much, it doesn't matter much if an issue is reported twice.
Look here. https://review.typo3.org/c/Packages/TYPO3.CMS/+/64080
Add this to your constants and setup override for felogin.
Works totally fine for me in TYPO3 10.4.9
Constants
plugin.tx_felogin_login {
view {
# cat=Frontend Login/02_Template/102; type=string; label= Path to template root (FE)
templateRootPath = EXT:providerExt/Resources/Private/Templates/FeLogin/
# cat=Frontend Login/02_Template/103; type=string; label= Path to template partials (FE)
partialRootPath = EXT:providerExt/Resources/Private/Partials/FeLogin/
# cat=Frontend Login/02_Template/104; type=string; label= Path to template layouts (FE)
layoutRootPath = EXT:providerExt/Resources/Private/Layouts/FeLogin/
}
}
Setup
plugin.tx_felogin_login {
view {
templateRootPaths.10 = {$plugin.tx_felogin_login.view.templateRootPath}
partialRootPaths.10 = {$plugin.tx_felogin_login.view.partialRootPath}
layoutRootPaths.10 = {$plugin.tx_felogin_login.view.layoutRootPath}
}
}
Path to Login.html Override in Template Folder
providerExt/Resources/Private/Templates/FeLogin/Login/Login.html

No default link classes in typo3 8 anymore?

In V7 all internal/external/download links got an additional class by default, like 'internal-link' or 'download'.
Looks like in V8 with the new CKEditor this feature is gone.
Is there a way to reimplement it via typoScript or some kind of yaml RTE config?
An automatic solution, not the solution where the user have to pick a custom style, thats our current workaround.
If these classes should be applied automatically to specific link types without enabling the editors to change those classes, you should go for TypoScript parseFunc:
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Parsefunc.html?highlight=parsefunc
Especially makeLinks, tags and typolink should be useful here:
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Makelinks.html#makelinks
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Tags.html#tags
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Typolink.html#atagparams
For example you would assign a specific class to an external http link automatically created by makelink like this:
parseFunc {
makelinks = 1
makelinks {
http {
keep = path
extTarget = _blank
ATagParams = class="external-link"
}
}
}

Where must finisher files (for powermail finisher) be located?

I am currently trying to add a finisher to my powerplay form.
The target is to delete all elements in a specific folder after the form is submited.
I currently use :
this tutorial
I first put this into my setup.txt
plugin.tx_powermail.settings.setup {
finishers {
1 {
class = Vendor\Ext\Finisher\DoSomethingFinisher
}
}
}
at this location: ftp://ftpIP/typo3cms/pagename/typo3conf/ext/powermail/Configuration/TypoScript/Main/setup.txt
Now i should create a PHP-File:
Add a php-file DoSomethingFinisher.php and extend your class with the AbstractFinisher from powermail:
But where shuld I place that PHP File? In the same place as the setup.txt?
Hope someone can help. Thank you very much.
Thomas
That question is related to TYPO3 autoloading and not to powermail. If you want to add PHP-Files to your TYPO3, you should use an extension.
There are some manuals how to get the autoloading to work with your PHP-Files (see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Autoloading/Index.html).
You shouldn't modify the files in the folder powermail, otherwise you will be in trouble when you want to update the extension. Instead, create a new extension with extension_builder or take powermailextended and modify that extension.
Assuming you use powermailextended:
If you call the Finisher In2code\Powermailextended\Finisher\MyFinisher, then it needs to go in EXT:powermailextend\Classes\Finisher\MyFinisher - this is how Typo3 autoloads the PHP files.