May I use variables in Page TSConfig - Typo3 in order to set dynamic content? - typo3

I am looking for a way to be able to set some content dynamically in the layout of a typo3 site.
For example, is there a way to set dynamically the title of the site?
So, I am wondering if is it possible to define some variables in Page TSConfig area as shown in the following image.
This option would be very usefull in cases where users are not so experienced to edit this content from Template tools --> Setup.
Thanks a lot!!!

Only admins have access to pages TSconfig field. They have access to the template record (and the TypoScript module) too.
Therefore you should use constants instead which do exactly what you want to archive.
Have a look at the TYPO3 documentation: https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/TypoScriptTemplates/Index.html
Define in constants:
# cat=page type=string; label=Page Title
title = foo
And use in setup:
config.pageTitle = {$title}

Related

Typo3 8.7.31 & extension fe_manager: No TypoScript found

In my TYPO3 8.7.31 I have an error:
No TypoScript found. Did you already setup module.tx_femanager.settings.configPID in your PageTS?
As the error message says, you need to configure module.tx_femanager.settings.configPID in your Page TSConfig (not to confuse with TypoScript). This is necessary to make the TypoScript setting available also in the TYPO3 backend which is not the case by default.
As mentioned in the documentation you need to specify the page id (pid), where your main TypoScript settings (frontend) are stored. Usually you will take the root page of your installation.
To set the Page TSConfig, edit the page properties of your root page and switch to the tab Resources. There you can find a field Page TSConfig. In this field you need to put above mentioned setting.
A hint for your next question: please put more effort into your question! Let us know what you tried so far. And please do a proper formatting of your question.
The Problem can also appear, if you have set the
module.tx_femanager.settings.configPID = 1
in your root page ts
but not included the main settings (femanager) in the template.

Ensure generated links in TYPO3 use the absolute path

I have a website in TYPO3, it has a header and footer and a load of generated page links.
Is there any parameters or TypoScript that can be used that would enable all links to have absolute paths? e.g. the item that generates the menu might look like
<f:cObject includeAbsolutePath="true" typoscriptObjectPath="lib.content_subMenu" />
I basically need all page links to be absolute.
I am using Typo3 V7.6
config.absRefPrefix might be your solution. But this could lead to drawbacks as well, e.g. in multi-domain environments. But in that case, you might work with conditions to set a proper domain name.
See details in the documentation.

Configure TT_News

I'm searing for several hours but can not found an good example on how to configure the tt_news extension with typoscript. I would like to know how I can disable showing the date, cat info and archive to make it a simple overview. Also clicking on the news item does not show the single page? Can any one post an simple example of typoscript for configuring an simple news overview with the tt_news extension?
I think the tt_news documentation will answer all your questions.
Your first issue is very simple to solve: just use your own templates and remove the corresponding marker.
Copy the template from tt_news/pi/tt_news_v2_template.html to somewhere else, e.g. into fileadmin/myproject/tt_news_v2_template.html
Configure tt_news with the new location of the template in your TypoScript Constants: plugin.tt_news.file.templateFile = fileadmin/myproject/tt_news_v2_template.html (you have to include the static TypoScript of tt_news too)
Your second issue seems to be a problem with the single pid configuration. You can solve this with defining your single page in the TypoScript Constants:
plugin.tt_news.singlePid = 123
It seems that you are new to TYPO3 and tt_news, so maybe you should simply follow the quick start guide in the tt_news documentation.

using fluidcontent (fluid powered TYPO3) in a TYPO3 multidomain setup

I have an TYPO3 installation with two domains. Each domain has its own provider extension and static template file.
Example:
domain1.com -> providerextension1
domain2.com -> providerextension2
Is it possible to hide the fluidcontent FCEs from providerextension1 in domain2.com?
Example from Bootstrappackage (https://github.com/Ecodev/bootstrap_package)
As soon as an extension has included fluidcontent FCEs (like the fluidcontent_bootstrap) it will add these to all domains, also when the TypoScript Configuration is not included.
If I understand the question completely, the answer is no: you cannot in TYPO3 make your TypoScript that is available in the backend, depend on the domain name being used. There is a way to make TypoScript conditions for the frontend output (for example a condition to only add template paths for your provider A when domain is X), but the same is not possible in the backend.
You are of course welcome to add a feature request on our issue tracker - I don't see any immediate problem with a feature to toggle on and off particular provider extensions based on for example a TypoScript setting. But you should keep in mind the limitation mentioned above since it implies that in order to achieve your desired goal you must place each domain record on a page tree of its own and closely manage the TypoScript that controls the available Provider Extensions on each page tree.
Put shortly: even if you get this feature request filled, it may not be the solution you want and you may have to restructure your pages and domains to get where you need to be.
The problem is, that the FCE are defined in the "ext_tables.php" and "ext_localconf.php" and these files are always loaded when the extension is enabled.
You can alter "ext_tables/ext_localconf" with a simple condition like
if($_SERVER['server_name'] == "www.yourdomain.com") {
//init FCEs here
}
You can try to override the template paths for one domain with an empty value or at least a path to an empty directory. Maybe flux is smart enough to ignore empty template paths.

In Typo3, what is the difference between setup, constants, and TSConfig

It seems there are three different places where I can write TypoScript: in templates, there is the constants field and the setup field, and in each page, there is a TSConfig field. However, it seems each TypoScript command need to go in a specific field. Most of the time, I have to try before finding if a given configuration goes into template setup, or in root page TSConfig.
Why are there three different places to write TypoScript? What is the use of each of them?
TSconfig is mainly for the backend
configuration. You can
add/alter/remove values from forms,
change the behavior what kind of
records users can add, default
usergroups etc. see About TSconfig for more
details.
Typoscript in the template is used to change the frontend behavior, template parsing, Extension configuration, navigation etc. Typoscript in the template has so called cObjects which provide useful functionality like Image manipulation (IMAGE), getting records from the database (RECORDS), creating menus (HMENU), see TypoScript Reference.
Typoscript constants are much like variables, which can be used within your template Typoscript. e.g. you have an email address which occurs in many different places within the Typoscript template, you might want to define it as constant. See documentation for more info.