TYPO3: Where is "sitetitle" set? - typo3

Where is this "sitetitle" set:
return $GLOBALS['TSFE']->tmpl->sitetitle;
I found this line of code inside a ViewHelper of WapplerSystems\WsT3bootstrap\ViewHelpers\Site

I found it by my self. Go to TYPO3 Backend / Web / Template. Just open the template setup and you will find the field Website-Title. This is the $GLOBALS['TSFE']->tmpl->sitetitle. Maybe there is a parent template who sets the sitetitle!

Related

TYPO3 8, Form extension - best practice for custom yaml files

When generating forms with the form module the corresponding yaml files get stored in fileadmin/user_upload.
Now I want to integrate those yaml files into my sitepackage and thus into my CVS. Where is the correct place for them? In the example extension they are stored in Resources/... while I would think they have to go into Configuration/Yaml
And how do I configure the form extension to search them in that place?
While it's basically a matter of taste where exactly one saves his form definitions, I try to separate form configuration and form definitions.
From the official documentation:
[...] the form configuration allows you to define:
which form elements, finishers, and validators are available,
how those objects are pre-configured,
how those objects will be displayed within the frontend and backend.
In contrast, the form definition describes the specific form,
including
all form elements and their corresponding validators,
the order of the form elements within the form, and
the finishers which are fired as soon as the form has been submitted.
Furthermore, it defines the concrete values of each property of the mentioned aspects.
So, for more clarity I save all form configuration in a sitepackage under Configuration/Yaml/ and the form definitions under Resources/Private/Forms, neighbouring the templates.
I wrote a full tutorial how to use custom templates with EXT:form, which also includes the answers to your question.
In short:
Register YAML configuration with TypoScript in your extension root folder as ext_typoscript_setup.txt (as recommended1)
plugin.tx_form.settings.yamlConfigurations {
100 = EXT:my_extension/Configuration/Yaml/CustomFormSetup.yaml
}
module.tx_form.settings.yamlConfigurations {
100 = EXT:my_extension/Configuration/Yaml/CustomFormSetup.yaml
}
CustomFormSetup.yaml – setting up a new storage path
TYPO3:
CMS:
Form:
persistenceManager:
allowedExtensionPaths:
10: EXT:my_extension/Resources/Private/Forms/
allowSaveToExtensionPaths: true
allowDeleteFromExtensionPaths: true
1TypoScript inside an ext_typoscript_setup.txt is automatically loaded in both frontend and backend of your TYPO3 installation directly after installing your extension. This differs from other TypoScript files, which have to be included manually, e.g. as static templates. See official Form Framework documentation.
I'd suggest Resources/Private/Forms for your form definitions. The form extension clarifies how to register additional form definition paths.

TYPO3: No template was found. View could not be resolved for action

I'm experimenting a bit with TYPO3 backend modules and I'm trying to get a view when I click my module in the left menu in the backend. However when I click this I get the following message:
Sorry, the requested view was not found.
The technical reason is: No template was found. View could not be resolved for action "list" in class "MyVendor\MyModule\Controller\ConnectionController".
I have the view for the list action in the folder Resources/Private/Backend/Templates/Connection and the file is called List.html (uppercamelcase)
I'm using TYPO3 version 7.6.15 and I made this module with the extension builder.
Any help would be appreciated.
Some possible reasons for this (or similar) errors:
1. Forgetting to include the TypoScript static templates
see Documentation: Include TypoScript from extensions
Choose WEB > Template module (in Module menu)
Select your start (root) page (in page tree)
Select Info / Modify (in Docheader)
Choose Edit the whole template record
Choose tab Includes
Select your extension under Available Items
This will activate the TypoScript under Configuration/TypoScript
2. Wrong path
The Template paths set via TypoScript must match the available template paths in the filesystem.
Usually, the default path is:
Resources/Private/Templates (for frontend plugins)
or
Resources/Private/Backend/Templates (for backend modules)
This must have been set correctly via TypoScript. For example:
Configuration/TypoScript/setup.typoscript:
# Module configuration
module.tx_myexample_web_myexamplelist {
view {
templateRootPaths.0 = EXT:myexample/Resources/Private/Backend/Templates/
...
module. is for backend modules
if you are working with frontend plugins, use plugin. instead of module.
the correct file ending for TypoScript is .typoscript since TYPO3 8 and no longer .ts or .txt. For version 7, it is correct to use .ts.
3. Incorrect filenames
Make sure that the name of the Controller matches the name of the subdirectory in the Templates directory. The name of the template file is capitalized.
Controller/SomeController.php: listAction()
matches
Resources/Private/Backend/Templates/Some/List.html
Where to define the TS:
either as described above e.g. in Configuration/TypoScript setup.typoscript (and load this via static include).
The file ext_typoscript_setup.typoscript in the extension root can be used to setup TypoScript independent of page-tree and template-records. This will be included in the setup section of all TypoScript templates. but also consider the warning in the documentation.
Load TypoScript or TypoScript files directly in the extension with functions from ExtensionManagementUtility
You can also change your template root path (the relative path from where the extension takes the tempaltes):
go to the
setup.ts
file (or setup.txt file; depends on personal preferences and local configuration) and add the following line
plugin.tx_myslider.view.templateRootPath = EXT:path/to/custom/directory/
for example it could look like this:
EXT:slider/Resources/Private/Templates/myAwesomeFolder/
NOTE: slider is just a placeholder. You can simply replace it with your extension name
Add your extension to the website node. Until you add it, the setup.ts won't work.

Manage hierarchy / enforce priority of TS-templates

Well, there is actually another guy with exact the same problem. But until today, they didn't come up with a solution, that's why I'm asking it once again.
My entire TS is included by an extension in TYPO3 7.6.8. This works fine except with indexed_search. The TS inside my resources EXT get overwritten by the indexed_search default TS.
This is the order of the TS inside the Template-Analyzer:
SYS: TYPO3_CONF_VARS:FE:defaultTypoScript
EXT:fluid_styled_content/Configuration/TypoScript/...
... a bunch of other third party extensions ...
EXT:indexed_search/Configuration/TypoScript
EXT:templates_ext/Resources/Private/TypoScript
extbase
fluid
extensionmanager
belog
beuser
felogin
indexed_search
sys_note
realurl
So #7 is the extension which includes all my TS but it gets overwritten by #14. The only way to configure the indexed_search is inside the setup of the page template (which comes after all those above). But I want to avoid that to keep things clean.
Is there a way to prioritize a certain TS so that it doesn't get overwritten?
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.
Try putting the TS from your template extension inside the root page Setup field like this (adjust the path if necessary, your example says Resources/Private/TypoScript?):
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:templates_ext/Configuration/TypoScript/setup.ts">
This should make sure that it is included AFTER all the other includes (I assume you included those via the includes tab?)

Template could not be loaded in TYPO3 extension

Am using a new extension build in TYPO3 V4.5.0 and after it installed it in TYPO3 V6.2.x it shows the following error
The template files "/var/www/dev/typo3/typo3conf/ext/my_ext/Resources/Private/Layouts/Suche.html", "/var/www/dev/typo3/typo3conf/ext/my_ext/Resources/Private/Layouts/Suche" could not be loaded.
The layout i s present in the location. and path given also correct in backend..
How can i fix this?
Check so template filename has first letter uppercase.
The rule is that for action named fooBarAction() template file must be named FooBar.html

TYPO3 Powermail 2 - how change template for plugin instance

I have Powermail( new version, the one based on Extbase) instance at the bottom of each page. This instance is placed somewhere on the website and rendered in footer via RECORDS.
Now, I need this instance to have different templates than the rest of Powermail plugin instances.
So, how can I pass this configuration to the plugin instance? There is no option in flexform to specify the path to the template so I'm stuck.
Thanks in front ;)
You can use an extension template on the respective page, and set the templateRootPath accordingly - either by setting the constants plugin.tx_powermail_view.templateRootPath or by setting the setup settings plugin.tx_powermail.view.templateRootPath directly:
plugin.tx_powermail {
view {
templateRootPath = {$plugin.tx_powermail.view.templateRootPath}
partialRootPath = {$plugin.tx_powermail.view.partialRootPath}
layoutRootPath = {$plugin.tx_powermail.view.layoutRootPath}
}
}
(partials and layout follow the same pattern)
See: http://typo3.org/extension-manuals/powermail/2.0.0/view/1/48/
You can set a different layout for this in the "Extended" Tab of the form, as described here:
http://docs.typo3.org/typo3cms/extensions/powermail/Powermail/Faq/Index.html#how-to-change-the-style-selector-with-my-own-values-in-forms-pages
This way a class will be set in the < form >-tag, und you may style the record differently.