TYPO3 powermail front end set pid - typo3

I want to use powermail for a commenting system, including powermail and powermail frontend with typoscript on every page..
With the frond end module I would like to show only the mails of the current page.
I can set the value with
plugin.tx_powermail {
settings {
Pi2 {
main.pid = 15
}
}
}
which works
How do I assign the current page id?
main.pid.data = gp:id
does not work.
Or is there any approach for my problem?

main.pid.data = page:uid
should give you the uid of the current page.

Related

detail page title in browser drops to a backend news detail page title

It is not a bug, of course, but i cant figure out how to solve it.
With previous version of News there was all fine.
Sorry for my language, it hard to explain.
Current Behavior
For example - I have this page title behaivor for the first time news detail page visit -
"SiteName: Some NewsRecord Title" (this is fine, how it should be).
Then when i go to list view, and again click on news to view it in detail (or just refresh the page I'm currently viewing) - page title gets look like this:
"SiteName: news" where "news" is a page title in the backend page tree, that contains newsDetailView plugin
To override this strange behavior, i use such typoscript setup (But this should not be a permanent solution to the problem, of course)
[globalVar = TSFE:id = 7]
config.noPageTitle = 2
temp.newsTitle = RECORDS
temp.newsTitle {
dontCheckPid = 1
tables = tx_news_domain_model_news
source.data = GP:tx_news_pi1|news
source.intval = 1
conf.tx_news_domain_model_news = TEXT
conf.tx_news_domain_model_news {
field = title
htmlSpecialChars = 1
}
wrap = <title>SiteName: |</title>
}
page.headerData.1 >
page.headerData.1 < temp.newsTitle
[global]
Environment
TYPO3 version(s): [9.5.15]
news version: [8.0.0]
Composer (Composer Mode): [no]
With 9.5 and the nice SEO extension you really shouldn't do such stuff anymore. Don't use config.noPageTitle and it should work out of the box as the news extension will set the title just right.

TYPO3 Extbase Parameters in Url get ignored. No action is called

I'm writing an extension which checks for the browser version, and if the version isn't supported a hint is showed.
I'm doing this with a typoscript condition, which works well so far. But in the hint is a link for the ignoring. The link should call my action "setSessionParameters" in the controller "BrowserCheck". If the link is clicked the correct url gets called, but the same output as before is shown (the hint). The action is completly ignored. I tried to put in a non existing action, but not even an exception is called, which means for me: It's not checked if the question is allowed in the ext_localconf and neither it gets checked in the controller.
I think the typoscript configuration could be a problem, but I can't find a solution. Can anyone help?
Please see my code below
ext_localconf.php:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'VENDOR.' . $extensionKey,
'browsercheck',
[
'BrowserCheck' => 'setSessionParameter',
],
[
'BrowserCheck' => 'setSessionParameter',
]
);
page.typoscript:
page = PAGE
[session('wcobrowsercheck') == "ignore" || checkInternetExplorer()]
page{
//normal setup
}
[ELSE]
// called setup for hint-case
page >
page = PAGE
page{
typeNum = 0
shortcutIcon = {$files.favicon.path}
10 = FLUIDTEMPLATE
10 {
templateRootPaths {
0 = EXT:my_extension/Resources/Private/Templates/BrowserCheck
}
layoutRootPaths {
0 = EXT:my_extension/Resources/Private/Layouts/BrowserCheck
}
templateName = MainPage
}
includeCSS {
...
}
}
[END]
link call in the template:
<f:link.action controller="BrowserCheck" action="setSessionParameters" extensionName="my_extension" pluginName="browsercheck" arguments="{ignore: 'true'}"> ignore </f:link.action>
I see 2 issues with your setup.
You define the PAGE object twice. And the second time you wipe all previous configuration
I can't see that you have placed the plugin on the page.
As your question targets the second issue, I recommend adding the plugin to the page via typoscript if you want that plugin to be available everywhere.
page = PAGE
// ...
page.999 < tt_content.list.20.extkey_pluginname
Or you use a plugin that is placed on the page as a content element. Both will work. But with the current setup you cannot call the plugin as it's not present on the page.

Create a new link stye in Typo3?

Is there a way to add a new style to the Insert Link dialog in Typo3?
Currently they are "internal-link", "internal-link-new-window", or no style.
I have tried putting various things in the Page tsconfig with no results at all...
I found this on another site which looks like it does what I want but I can't get it to do anything:
RTE.classesAnchor {
tollerLink1 {
class = button
type = page
titleText = Button
}
}
RTE.default {
classesAnchor:=addToList(button)
}
In your TsConfig (Home Page Properties - Resources - Page TSConfig)
RTE.default.buttons {
link.properties.class.allowedClasses := addToList(internal-link-new-window)
}

New page type calling plugin through Typoscript

I've created a new page type with doktype = 150, and want all pages of this type to call a plugin. What is the correct way to do this using Typoscript? This is what I've got so far:
[page|doktype = 150]
# Typoscript for page type 150, product plugin
prod_page = PAGE
prod_page {
typeNum = 1 <-- I want this to be 0!
10 = COA
10 < tt_content.list.20.products_pi1 <-- Calls default plugin action.
20 = TEXT
20 {
stdWrap.field = productid <-- Want to use productid with plugin action.
stdWrap = <p>|</p>
}
}
[global]
If I change typeNum to 0, the plugin won't be rendered. Do you know why?
I also would like to know how to change the action called be the plugin. Now the default action is called, which is not what I want. Rather, I want another action show to be called with product id = productid from the page record.
Grateful for your help.
Shouldn't the typeNum be equal to the doktype? What happens if you leave the setting away?
Also, I'm not sure if you're on the right path with how you embed your plugin.
[page|doktype = 150]
# Typoscript for page type 150, product plugin
prod_page = PAGE
prod_page {
10 < plugins.my_plugin
// 10.settings.productid.data = GPvar:productid // just phantasizing here
}
[global]

Get page header and footer preview in backend

I have created a TYPO3 plugin to add new content columns to tt_content.
I need the header and footer content for my preview page in the backend. Once i get the header and footer I can show my contents in between this.
I want to insert some edit features in the content area. that is why I need the html rendered output to a php variable.
I am using templavoila.
I tried this - but got an error:
$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$conf = array('userFunc' => 'tx_templavoila_pi1->main_page');
$content = $this->cObj->USER($conf);
#1316104317: The default controller for extension "myplugin" and plugin "ContentRenderer" can not be determined. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
You can use this TypoScript :
10 = USER
10 {
userFunc = tx_extbase_core_bootstrap->run
pluginName = Pi1
extensionName = EXTNAME
controller = CONTROLLERNAME
action = ACTION
}
Just replace EXTNAME, CONTROLLERNAME, ACTION.