so all I actually want to do is something like
plugin.tx_felogin_pi1.redirectPageLogin = page:id
where the page:id is the PID of the current page. replacing 'page:id' with a number works as expected BUT I do need the PID instead of a fixed number. any hints are welcome
redirectPageLogin has to be a single int value:
$redirect_url[] = $this->pi_getPageLink(intval($this->conf['redirectPageLogin']));
Alternative: use as $redirMethod: getpost or referer
I think that'll fit four you.
Try
plugin.tx_felogin_pi1.redirectPageLogin = TSFE:id
or
plugin.tx_felogin_pi1.redirectPageLogin = {TSFE:id}
or
plugin.tx_felogin_pi1.redirectPageLogin.cObject = TEXT
plugin.tx_felogin_pi1.redirectPageLogin.cObject.insertData = 1
plugin.tx_felogin_pi1.redirectPageLogin.cObject.value = {TSFE:id}
Related
I'm trying to send a mail via the powermail extension to different receivers, depending on the value a user has selected in a form dropdown. This practice of dynamic receivers is described in the powermail documentation. Basically:
receivers1.email = CASE
receivers1.email {
key.data = GP:tx_powermail_pi1|field|receiver
1 = TEXT
1.value = receivera#domain.org
default = TEXT
default.value = receiverb#domain.org
}
Now I'm facing the following problem: my values for "receiver" are not numeric (as in the example), but text values from a dropdown. Some of them contain spaces, some of them contain umlauts (öäüß). If I try to add …
Not wörking = TEXT
Not wörking.value = anotheremail#nowhere.org
Typo3 will complain and not update anything. (Bad property!
You must enter a property with characters a-z, A-Z and 0-9, no spaces!Nothing was updated!)
I tried simply 'escaping' the forbidden characters with a backslash, not working. Had an idea of converting the key.data via stdWrap rawUrlEncode, but did not work either. Google came up with this solution, but I don't understand what's going on and could not use it successfully.
How can I get around this? Thanks a lot for any kind of hint!
I pretty like your rawUrlEncode solution. Can you provide us your solution of it here? According to this online converter the result should be something like:
key.data = GP:tx_powermail_pi1|field|receiver
key.stdWrap.rawUrlEncode = 1
Not%20w%C3%B6rking = TEXT
Not%20w%C3%B6rking.value = anotheremail#nowhere.org
Maybe for each CASE some signs like "%" are not allowed. In that case you maybe refer to the "replacement" function. https://docs.typo3.org/typo3cms/TyposcriptReference/8.7/Functions/Replacement/Index.html#replacement
key.data = GP:tx_powermail_pi1|field|receiver
key.stdWrap.replacement {
10 {
search.char = 32
replace = _
}
// Add umlauts and other signs!
}
Not_wörking = TEXT
Not_wörking.value = anotheremail#nowhere.org
This is my typoscript code :
lib.test.renderObj = COA
lib.test.renderObj.10 = TEXT
lib.test.renderObj.10.stdWrap.field = header
lib.test.renderObj.10.stdWrap.case = lower
lib.test.renderObj.10.stdWrap.trim = 1
lib.test.renderObj.10.stdWrap.wrap = <div class="element">|</div>
The header field is well received, letters have been lowercased and the field is well wrapped by a element. The only problem is that i can't make the TRIM properties effective. I also tried to use the search/replace properties -> no success.
Any clue ? :)
You can search and replace since 4.6. The documentation you can find here: https://docs.typo3.org/typo3cms/TyposcriptReference/6.2/Functions/Replacement/
lib.test.renderObj.10.stdWrap.replacement {
10 {
search = # #
replace =
useRegExp = 1
}
}
Don't know if the replace is really working, can't test it.
My problem is, that i cant get the TSFE:id into the config.htmlTag_setParams
manifest = TEXT
manifest.value = manifest="/cache.manifest?uid={TSFE:id}"
manifest.insertData = 1
config.htmlTag_setParams < manifest
can anyone give me a clue, i tried everything and cant get it to work, is it even possible?
or is there any other way?
config.htmlTag_setParams.data = TSFE:id
config.htmlTag_setParams.wrap = manifest="/cache.manifest?uid=|"
According to TSref config.htmlTag_setParams is string, so no stdWrap can be applied here, but there is an option config.htmlTag_stdWrap, which you can use (from TYPO3 4.7) in desired way:
config.htmlTag_stdWrap.cObject = TEXT
config.htmlTag_stdWrap.cObject.data = TSFE:id
config.htmlTag_stdWrap.cObject.wrap = <html manifest="/cache.manifest?uid=|" >
NOTE: I didn't test an example above, so, please, check if it works. If not - check this ticket for more advanced html tag override.
I'm using the extension seo_dynamic_tag, which is a fantastic plugin for TYPO3 SEO purposes.
It uses registers to store the generated meta description and keywords. Later on in the script, the page metadata is filled in from these registers:
page {
meta {
description {
field >
data = register:description
}
keywords {
field >
data = register:keywordss
}
}
1000 < temp.seo
}
So far it works like charm.
But in addition I'd like to display a TEXT object on the page with the meta description on the bottom. The text should read the meta description and some other stuff. That's where I need your help.
I tried to do the "magic" like this:
temp.description = COA
temp.description {
10 = TEXT
10.value = Meta description: {register:description}
stdWrap.insertData = 1
}
lib.footer < temp.description
This simply does not work. If I want to display something else, for example {page:title} or {date:y-m-d}, data insertion works. For register:xxx it doesn't.
I already spent lots of hours to google out my desired solution, but no success :(
Do you have any idea what I'm missing here?
I'm using TYPO3 4.5.3 (I know I should update ;)).
Many thanks in advance for your help! :)
Your stdWrap.insertData = 1 is applied to your COA-object, and not to your TEXT-object. You can instead set 10.insertData = 1 or just write the following:
10 = TEXT
10.data = register:description
Yeah this works in FF and Chrome, but for some reason wont work in IE 8. I'm using a radio button to clear a section of a form.. that section is a select box, but I don't want to leave the area empty - instead I want to reset it to what it was when the page loaded. At the moment IE8 is just leaving me with an empty small select box.
Html:
<select id="city_select" disabled="true" name="location_id" onchange="show_search_button();"><option selected>Select your city</option> </select>
Javascript:
document.getElementById('city_select').innerHTML = "<option selected>Select your city</option>";
I've also tried using location_id instead of city_select in the javascript but to no avail.. innerText and innerContent dont work either.. though the inner.HTML works in IE8 for an earlier function, but that isnt trying to innerHTML into a form. Does anybody know why this works in Chrome and FF but not IE8? and is there a solution to this? Any help appreciated thanks!
Try this:
document.getElementById('city_select').options.length = 0;
Then create a new option and push it onto the options array of the select. The options are a tricky bit that don't behave like other markup.
Edited to show how to create an option:
var sel = document.getElementById('city_select').options.length = 0;
var opt = document.createElement('option');
opt.value = "Select Your City";
sel.options.push(opt);
sel.selectedIndex = 0;
There are supposed to be 4 way of assigning new options to a select element. Some work in some scenarios and others work in others. Look here - How to Add options to <SELECT>, in IE Windows Mobile 5
For me, Robusto's solution didn't work due to three reasons:
1) sel variable in the first line is assigned document.getElementById('city_select').options.length = 0; instead of simply holding the select element (for later use in 4th and 5th line) and then deleting options in a next line, like this:
var sel = document.getElementById('city_select');
sel.options.length = 0;
2) the 4th line sel.options.push(opt) (or later suggested sel.options[0] = opt) throws an Object doesn't support this property or method error. Instead use this:
sel.appendChild(opt);
3) apart from assigning values to options you must also assign text to display. You do it like this:
opt.innerText = "Select Your City - displayed";
Therefore, to sum up the whole piece:
var sel = document.getElementById('city_select');
sel.options.length = 0;
var opt = document.createElement('option');
opt.value = "Select Your City";
opt.innerText = "Select Your City - displayed";
sel.appendChild(opt);
sel.selectedIndex = 0;