I'm developing a multi language website with Typo3 v10.4.32.
Everything works fine. Except image metadata translation feature.
I uploaded an image, and I added translation for metadata (German is default)
After then I added page translation. In backend I see that images have default language metadata in both languages
If I click the image element to edit I see the correct behaviour: Typo3 is aware that the image has translation of metadata
In frontend unfortunately I see the problem: the default language metadata is shown
Typoscript template is simple:
config {
linkVars = L
sys_language_mode = content_fallback
sys_language_overlay = 1
sys_language_softExclude = tt_content:image
sys_language_softMergeIfNotBlank = tt_content:image
sys_language_uid = 0
}
# Default PAGE object:
page = PAGE
page.10 = TEXT
page.10.value = HELLO WORLD!
page.20 = CONTENT
page.20.table = tt_content
page.20.select {
orderBy = sorting
where = {#colPos} = 0
}
[siteLanguage("languageId") == 1]
config.sys_language_uid = 1
config.htmlTag_langKey = en
config.language = en
config.locale_all = en_US
[end]
Is the code below necessary ? since it is configured in yaml file
config.sys_language_uid = 1
config.htmlTag_langKey = en
config.language = en
config.locale_all = en_US
I could add translation in content elements, but images are supposed to be used in many places, so it becomes annoying to add the same text
I tried to search a solution, but I found very old similar issue with Typo3 v7 and the issue was supposed to be fixed in the next version Typo3 v8.
I suppose that the problem does not connect to NGINX ?
Maybe I need to add some code in LocalConfiguration ?
Related
Upgraded Website to TYPO3 V. 10. With this changed from rtehtmlarea to ckeditor. Works well. But I used data from REGISTER as Variable in the RTE text: {REGISTER:heute}. But now there is no output. The corresponding Typoscript-Setup was(is)
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.innerStdWrap_all.insertData = 1
tt_content.text.12 = LOAD_REGISTER
tt_content.text.12.heute = TEXT
tt_content.text.12.heute {
data = date:U
strftime = %d.%m.%Y
}
tt_content.text.21 = RESTORE_REGISTER
tt_content.text.22 = RESTORE_REGISTER
Is there a similar easy solution with ckeditor?
I use TYPO3 7.6.2 LTSwith the new fluid_styled_content. It's brilliant! Very easy to change the header types or upload elements or text/image stuff ...
But how can I change the Labels at Backend-TCA for the Header element f.e. Is it still over TSconfig or a locallang-file? And where it is?
And how can I disable some headlines. I only use Layout 1-3. If I found this, i'll never go back to css_styled_content..
Thanks for your advice.
The old way was like this TSconfig ..
TCEFORM.tt_content.header_layout.altLabels {
1 = H2 rot
2 = Grafische Ueberschrift
3 = Versteckt (CSS)
4 = Nicht ausgeben
}
TCEFORM.tt_content.header_layout.removeItems = 5,6,7,8,9,10,100
And TS setup
lib.stdheader = CASE
lib.stdheader {
key.field = header_layout ..
Nothing should have changed within TSconfig ... tested it ... works like a charm.
The frontend rendering of the header is not defined via TS any more (mostly), but via partials. Checkout the path settings in the TypoScript of lib.fluidContent. You can overwrite the default templates, partials and layout with your own fluid templates.
I try to set my main tile with the templatew TileWide310x150SmallImageAndText02. I had a look at the sample code and took this out of it:
ITileSquare310x310SmallImagesAndTextList04 tileContent =
TileContentFactory.CreateTileSquare310x310SmallImagesAndTextList04();
tileContent.Image1.Src = "ms-appx:///Assets/Logo.png";
tileContent.TextHeading1.Text = "Cashflow";
tileContent.TextWrap1.Text = "Income: 500";
tileContent.TextWrap2.Text = "Spending: 400";
tileContent.TextWrap3.Text = "Earnings: 200";
// Create a notification for the Wide310x150 tile using one of the available templates for the size.
ITileWide310x150SmallImageAndText02 wide310x150Content =
TileContentFactory.CreateTileWide310x150SmallImageAndText02();
wide310x150Content.Image.Src = "ms-appx:///Assets/Logo.png";
wide310x150Content.TextHeading.Text = "Cashflow";
wide310x150Content.TextBody1.Text = "Income: 500";
wide310x150Content.TextBody2.Text = "Spending: 400";
wide310x150Content.TextBody3.Text = "Earnings: 200";
// Create a notification for the Square150x150 tile using one of the available templates for the size.
ITileSquare150x150PeekImageAndText01 square150x150Content =
TileContentFactory.CreateTileSquare150x150PeekImageAndText01();
square150x150Content.Image.Src = "ms-appx:///Assets/Logo.png";
square150x150Content.TextHeading.Text = "Cashflow";
square150x150Content.TextBody1.Text = "Income: 500";
square150x150Content.TextBody2.Text = "Spending: 300";
square150x150Content.TextBody3.Text = "Earnings: 200";
// Attach the Square150x150 template to the Wide310x150 template.
wide310x150Content.Square150x150Content = square150x150Content;
// Attach the Wide310x150 template to the Square310x310 template.
tileContent.Wide310x150Content = wide310x150Content;
// Send the notification to the application? tile.
TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification());
This will show the tile correctly in the 150x150 size, but not in the wide. Then only the text is shown but not the image.
Here's a screenshot:
Thanks for your help!
NPadrutt
The SmallImageAndText Templates only show an Image on Windows, not on Phone.
Please refer to the template catalog for the direfences here.
Tipp: Template catalog is available at aka.ms/tiletemplates
I have a default text/image element on a TYPO3 page and the content inside is in this order:
title
image
text
I need this order:
image
title
text
I've been trying to modify the tt_content std.header object within my typoscript but it is not working properly.
Does anyone know an answer to this?
Take a look into: /typo3/sysext/css_styled_content/static/setup.txt
Search for: CType: image (line ~650), then copy it whole into your typoscript template, purge tt_content.image.10 (it's header) and try to place lib.stdheader in required place in tt_content.image.20... just a concept, I did something similar years ago and don't remember details...
Other option is using CSS/JS for changing the order, maybe it will be easier ?
tt_content.textpic {
# remove default header
10 >
20 = < tt_content.image.20
20 {
layout = TEXT
layout.value = <div class="your-classes###CLASSES###">###IMAGES###</div>###TEXT###
# insert the header as part of text
text.15 = < lib.stdheader
text.20 = < tt_content.text.20
text.wrap >
}
}
I'm trying to theme one of my content types, which has images uploaded to each instance using the image attach module.
Using the developer module, I've found the iids value of the uploaded image (eg 305), but i'm having trouble finding out how I can actually display the image in my code. This line outputs the node id of the image which has been uploaded, but how can I then use that?
$image = $node->iids[0];
I've tried using hook_image, but I can't seem to get that working...
Thanks for any help.
This did the trick...
$nodeid = $node->nid;
$get_image = db_query('
SELECT p.filepath as imagefilename
FROM {image_attach} i
LEFT JOIN {image} a ON i.iid = a.nid
LEFT JOIN {files} p ON a.fid = p.fid
WHERE i.nid = %d AND p.filename = "recipe_thumb"', $nodeid);
$obj_image = db_fetch_object($get_image);
$imagefilename = $obj_image->imagefilename;