typo3 styles.content.get not working - typo3

I've testing with TYPO3 7.6.9 and tried the following without success:
# Default PAGE object:
page = PAGE
page.10 < styles.content.get
I want to get the normal content from the typo3 page, but it not show anything.
Please help me,
Thanks.

Check if you have included the static template
like in the screenshot below:

Related

Typo3 News Extension - Global News Link Custom per Partner

I have the following problem. We have stored several websites for our partners in a Typo3 installation.
We have set up the site so that we bring global news for each customer to their website. If I now create a global message, it appears on the customer's website. Now we would like to place a separate link in the news for each customer. But apparently this is not possible.
Does anyone have any idea how to do that?
Thank you so much!
We use:
typo3 9.5.14
Extension: News System (news)
I am not sure, whether I understand you correctly.
You can easily use different templates for each customer by changing the paths to the template files in Typoscript for each websites:
plugin.tx_news {
view {
templateRootPaths.100 = EXT:your_extension/Resources/Private/News/Customer1/Templates/
partialRootPaths.100 = EXT:your_extension/Resources/Private/News/Customer1/Partials/
layoutRootPaths.100 = EXT:your_extension/Resources/Private/News/Customer1/Layouts/
}
}
Now you are able to set different links for each website.
Another way is to add a Typoscript variable in the settings section of the ext:news typoscript like this:
plugin.tx_news {
settings {
pageLinkUid = 123
}
}
And add the following link into your fluid template:
<f:link.page pageUid="{settings.pageLinkUid}">page link</f:link.page>
The link of the page can be changed with typoscript for each customer.

Problem with file_list extension of Typo3

I am pretty new in Typo3 world.
I'm trying to list all the files in a folder and parse them one by one. To list the files, I'm using "file_list" extension (https://docs.typo3.org/p/causal/file_list/2.4/en-us/Index.html) and following the image gallery tutorial (https://docs.typo3.org/p/causal/file_list/2.4/en-us/AdministratorManual/ExampleGallery/Index.html). To this end, I have created a folder at "/fileadmin/user_upload/test" and created three empty files in it for test purposes.
I have created these 4 files just as described in the tutorial:
ext_emconf.php
ext_icon.png
ext_localconf.php
ext_tables.php
This is the content of my "Configuration/TypoScript/setup.typoscript" file:
plugin.tx_filelist {
view {
partialRootPaths.100 = EXT:my_gallery/Resources/Private/Partials/
}
settings {
path = file:1:/user_upload/test/
mode = FOLDER
}
}
I have also created MyGallery.html under "typo3conf/ext/my_gallery/Resources/Private/Partials" with the same content as in the tutorial.
I have the file "typo3conf/ext/my_gallery/Resources/Private/Templates/Default.html" which includes one line:
<f:render partial="MyGallery" />
In Typoscript backend, I have created a page with a template and included "My Gallery(my_gallery)" and "File List(file_list)" static extensions in it.
The setup section of the page includes:
page = PAGE
page.10 = FLUIDTEMPLATE
page.10 {
templateName = Default
templateRootPaths.1 = typo3conf/ext/my_gallery/Resources/Private/Templates
partialRootPath = typo3conf/ext/my_gallery/Resources/Private/Partials
}
Now my page renders the template and partial in the frontend (I could confirm this by injecting dummy content) but does not show any folder list. According to the HTML template, I assumed there should be a "files" variable passed to the page, but when I reviewed the debug information, I could not even find such a variable.
I need help to parse the folder content in the frontend HTML file.
Not tried it myself, but after a quick look into the documentations you linked.
Assuming everything was done corretly regarding the documentations, the point what you missed is following:
In the backend, in the page module, on any page create a new content element. There should be the filelist plugin. In the plugin option, there should be a option, where you can select your created "My Gallery" template.
Filelist is an extbase plugin. So it must be placed in a page. As alternative, you may add a typoscript to directly render a plugin instance into a template variabel, you can place / output in the template. Or in any template.
The first and easier option would be to place it in a page as content element.
If you want it as variable, you can create / rendet it as shown in the filelist documentation on https://docs.typo3.org/p/causal/file_list/2.4/en-us/AdministratorManual/BestPractices/TypoScript.html
If you add such a snippet to typoscript (propely modified to match your stuff).
You can render it in the page template with:
<f:cObject typoscriptObjectPath="lib.filelist" />
But this would display it on every page.
For the start, I would suggest to go the "put it as an content element on a page" way.
edit 1 / answer on your comment
Maybe something went wrong or you missed, when you followed the gallery exampel on https://docs.typo3.org/p/causal/file_list/2.4/en-us/AdministratorManual/ …
Would suggest to check every step clearly.
Things, which came in my mind:
missing include of the default static template from the filelist extension/plugin on the root page / root template record
missing include of the static template from your dedicated extension (like in the example)
wrong order of the static includes (eventully)
not enabled your dedicated extension
missing cache clear
..

TYPO3 V9: Site configuration with absolute paths?

I'd like to configure my site similar to config.absRefPrefix behaviour in former TYPO3 versions.
Before it was like all links on a webpage had an absolute path when configured with config.absRefPrefix = https://www.example.com/. Now with the new site configuration module only the Typoscript generated links in the header and at the footer of the page have absolute paths. The links in the navi and in the content section are always relative.
Does anybody know how to configure the site to have the same behaviour as before in older TYPO3 versions?
If you want absolute URLs in TYPO3 9 or 10, one way could be the new "absolute" attribute for the typolink fluid ViewHelper:
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Functions/Typolink.html#forceabsoluteurl
I have tested this quickly on my website, works great for my logo.
For the Navigation: If you use the TYPO3 MenuProcessor and fluid to create your Menu, you can also work with the absolute="true" attribute. I also tested this, works fine.
For the content elements, these settings work for me on a 9.5.11 and even version 10:
// parseFunc
lib.parseFunc.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc.tags.link.typolink.forceAbsoluteUrl = 1
lib.parseFunc.tags.a.typolink.forceAbsoluteUrl.scheme = https
lib.parseFunc.tags.link.typolink.forceAbsoluteUrl.scheme = https
// parseFunc_RTE
lib.parseFunc_RTE.tags.a.typolink.forceAbsoluteUrl = 1
lib.parseFunc_RTE.tags.link.typolink.forceAbsoluteUrl = 1
lib.parseFunc_RTE.tags.a.typolink.forceAbsoluteUrl.scheme = https
lib.parseFunc_RTE.tags.link.typolink.forceAbsoluteUrl.scheme = https
I tested everything and have a complete "absolute URL website" here right now.

typo3 in news detail powermail form submit action is not working

I have added the powermail form as content element in news. So the form is shown in news detail page but that form is not submitted, i have given flexform option to redirect at thank you page. But that is not working and always gives 404 error, and no news found error.
Thank you in advance..
Did you saw this part in the FAQ of powermail: https://docs.typo3.org/typo3cms/extensions/powermail/Faq/Index.html#i-want-to-use-powermail-on-a-news-detail-page-but-the-error-reason-no-news-entry-found-comes-up
plugin.tx_powermail.settings.setup.misc.addQueryString = 1
Add in TypoScript
Tested TYPO3 11

Friendly url creation FLUID

I'm developping a TYPO3 extension (TYPO3 6.2) and I'm trying to create a link with parameters.
My working link is like this:
........./?param1=val1&param2=val2
Now I'm trying to make this url more friendly and want to show it as:
........./val1/val2
but when I access this url, I have a TYPO3 error saying:
Reason: Segment "val1" was not a keyword for a postVarSet as expected on page with id=MYID.
The url is created with FLUID:
<f:link.page pageUid="MYID" additionalParams="{tagid: '{var.id}'}">More</f:link.page>
Thanks for your help!
It's not about Fluid, but missing RealURL config, there are two good articles written by Dmitry Dulepov - RealURL author:
http://www.dmitry-dulepov.com/2008/05/realurl-made-easy-part-1.html
http://www.dmitry-dulepov.com/2008/06/realurl-made-easy-part-2.html