TYPO3 Content Element in TYPO3 6.0.1 - typo3

I use the Content Element in my Typoscript. The take a Image from a Folder. I mad this 1000 times in older TYPO3 Versions.
This is mi Code
lib.test = CONTENT
lib.test{
table = tt_content
select{
uidInList=4
pidInList=2
}
}
The Folder ID's are correct.
I mapped the test with Templavoila in a div(inner)

We've had the same issue and ported back to Typo3 4.7.x. TemplaVoila and also a lot other extensions still have problems working correctly in 6.x

Try below one;
lib.logo = RECORDS
lib.logo{
tables = tt_content
source = 123 #Respected Content Element ID
}

Related

How to show username in frontend in TYPO3 10?

In TYPO3 9 I managed to display the current username in a FLUID-template with the following Typoscript:
[loginUser=*]
temp.username = TEXT
temp.username {
insertData = 1
value = {TSFE:fe_user|user|username}
noTrimWrap = | ||
}
[global]
In TYPO3 10.4 this is not working anymore. Any idea how to display the current user?
Many thanks! Urs
In Typo3 V10, you have to use the Context API to retrieve data from global objects, try this :
[frontend.user.isLoggedIn]
temp.username = TEXT
temp.username.data = TSFE:fe_user|user|name
temp.username.wrap = |
[global]
Have a look at those links :
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/DataTypes/Index.html
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Context/Index.html#context-api
Florian
It's probably not working because you're using the old TypoScript conditions. Since TYPO3 9 the conditions work with Symfony expressions. The old conditions were deprecated in TYPO3 9 (but still worked) and removed in TYPO3 10. So [loginUser=*] will never be true in TYPO3 10. You should use [frontend.user.isLoggedIn] instead.
See https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Conditions/Index.html for more about the new TypoScript conditions.
Why use TypoScript? It is very limited on what it can bring back. I just finished a tutorial where you can use a ViewHelper to add an ExtBase variable which assigns the whole user object in the FrontEnd and you can use it wherever you want with all it's relations, even the image, which is difficult to get via TypoScript.
TYPO3 tutorial
Best regards

Reading data out of a flexform in typoscript

I try to read a flexform data out in typoscript. I tried it with several approaches, but none of them works correctly:
ajax.30 = TEXT
ajax.30.value = {$plugin.parser.settings.maxNumber}
ajax.40 < {$plugin.parser.settings.maxNumber}
ajax.50 < {$plugin.parser.settings.maxNumber}
ajax.60 = TEXT
ajax.60.data = {$field:flexform_varNum}
ajax.70 = TEXT
ajax.70.data = flexform : pi_flexform:settings.varNum
Can anyone give me a hint for the right syntax?
I'm using Typo3 9.5.13.
It is not possible to read out FlexForm data without an actual content element.
The CONTENT or COA objects would provide that. See for example Get FlexForm configuration in TypoScript
The feature was added in TYPO3 8.4 https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/8.4/Feature-17309-AccessFlexformValueViaTS.html

TYPO3: Upload files to FAL with powermail

I am using powermail to allow a FE-User to edit a couple of fields of his own User-Record. Works fine, no hassle.
Now I would also like to allow the upload of a file. Is there a way to save the file to FAL with powermail? Unfortunately I have found no resources on this whatsoever. Maybe it is possible to implement a userfunc when saving to DB that would generate the required DB entries? When using powermails "upload"-field-type the file gets written to uploads/tx_powermail. I have access to that files path in my db_entry step in typoscript and could pass it on to a userfunc - which in return should
generate the sys_file entry
delete a possiblibly already existing sys_file_reference
generate the new sys_file_reference
Am I missing something?
Any ideas on this? Has anyone done something like this before?
Or is my only alternative to switch from powermail to a custom extbase extension?
System: TYPO3 7.6.16, Powermail 3.17
Thanks
I have same problems in powermail and i use powermail Finisher class like below.
TYPOSCRIPT:
plugin.tx_powermail.settings.setup {
finishers {
1 {
class = Vendor\Ext\Finisher\AddImageFinisher
config {
# set pid.
pid = TEXT
pid.value = 79 // Here
#set powermail fields title
field_name = Name
field_place = Place
field_email = E-Mail
field_message = Message
}
}
}
}
Please reffere this link. AddImageFinisher Class file
At the moment powermail don't uses FAL relations. If you need something like this, you have to add an own finisher that does the upload stuff - see https://docs.typo3.org/typo3cms/extensions/powermail/ForDevelopers/AddFinisherClasses/Index.html
Just for the record. TYPO3 8 core ships a new form extension which allows both. With the save to database finisher you can easily edit fe_user data. Furthermore, all image uploads are handled as FAL. We will document this use case and release a small extension which does the job (soon).

TYPO3 news (tx_news) ordering of records not working

I'm running TYPO3 V6 and the latest version of tx_news (not tt_news) and when I attempt to change the order of sorting for the LIST display, the settings in the plugin are not overriding the Typoscript settings. There doesn't seem to be a way to change to sort order of articles in the list view. I am aware that flagging a news record as "top news" will float it to the top of the list, but none of my records have that flag set.
Has anyone else had this problem?
I got the same problem: My listview always showed the oldest news on the top. I've been searching for a solution for hours. As i wanted to start to change the extension files manually, I found the "setup.txt" in the configuration folder. From there I copied the following code into my Typoscript. The problem is solved now.
plugin.tx_news{
settings{
overrideFlexformSettingsIfEmpty = cropMaxCharacters,dateField,timeRestriction,orderBy,orderDirection,backPid,listPid,startingpoint,recursive
orderBy = datetime
orderDirection = desc
orderByRespectTopNews = 0
orderByAllowed = sorting,author,uid,title,teaser,author,tstamp,crdate,datetime,categories.title
list{
paginate {
itemsPerPage=4
insertBelow=TRUE
lessPages=TRUE
#forcedNumberOfLinks=3
pagesBefore=1
pagesAfter=1
}
}
}
}
You can ignore the pagination lines. Important is the orderby stuff.
Typo3 Version: 4.7 (not my fault :D )
News System Version: 2.3
Found the solution to this one - basically I had been loading the TS setup code from an external file, which was overriding the default TS setup from the Typoscript template setup field, or rather, it wasn't. I duplicated the TS code in the Typoscript template and the external file and finally it is being recognised and the fields can be sorted.

TYPO3 how duplicate content in severals page

I have a TYPO3 website.
I have 4 contents in my home page which I had created with TemplaVoila (flexible content).
I want to know if there is an easy way to duplicate these contents in all the others pages.
Yes, TemplaVoila allows you to reference ContentElements with special icon, which means that you insert it on some page and then you creates a references. If "first" CE changes, all references reflect it automatically.
Optionally, if all CE's are places in one TV's column you can use TV Content Slide extension by Bernhard Kraft.
Just map that content using typoscript using the below code and use it:
lib.leftcolumncontents = COA
lib.leftcolumncontents{
5 = RECORDS
5 {
tables = tt_content
source = 26 # content element id
}
15 = RECORDS
15 {
tables = tt_content
source = 36 # content element id
}
}