我正在使用TYPO3 7.2。使用标准模板引擎是否可以更改内容元素中标题日期的格式?
这分为两个问题:
1)您能否将标题日期显示为月份名称? (例如3月14日)
2)在后端,字段中选择的日期显示为dd / mm / yy,但在实际站点上显示为mm / dd / yy。我如何解决这个问题,以便在发布的网站上获得dd / mm / yy订单?
答案 0 :(得分:2)
在TypoScript模板中:
// Code excerpt, assume all vars are set here along with the onclick to call this snippit
// If below 0.0010 it will reduce var 'message' to 4 points after decimal, add 'var2'
// (marked irrelevant) text onto the 'message' variable then click .element2 based off
// of the contents of 'var1'
// As an example, 'message' is 0.0006. add var2 (great) you have a button showing
// [great 0.0006]. Then it will interact with the button beside it [.element2]
if(message < 0.0010) {
message = message.toFixed(4);
message = irrelevant var2 + message;
$("#" + irrelevant var + " .element1 span").text(message);
document.getElementsByClassName("element2")[var1].click();
}
// If below 0.006 it will reduce var 'message' to 4 points after decimal, add 'var3'
// (marked irrelevant) text onto the 'message' variable then click .element2 based off
// of the contents of 'var1', similar to the first if statement
else if(message < 0.006) {
message = message.toFixed(4);
message = irrelevant var3 + message;
$("#" + irrelevant var + " .element1 span").text(message);
document.getElementsByClassName("element2")[var1].click();
}
// If below 0.008 it will reduce var 'message' to 4 points after decimal, add 'var4'
// (marked irrelevant) text onto the 'message' variable then +1 to 'var1'
// This range doesn't interact with another button, it adds 1 to var1 that tells it to
// skip this instance of the .element2 button so it doesn't click the wrong line
else if(message < 0.008) {
message = message.toFixed(4);
message = irrelevant var4 + message;
function var1Count (){
var1++;}
var1Count();
$("#" + irrelevant var + " .element1 span").text(message);
}
// If greater than 0.008 it will reduce var 'message' to 3 points after decimal, then +1
// to 'var1'
// This range doesn't interact with another button, it adds 1 to var1 that tells it to
// skip this instance of the .element2 button so it doesn't click the wrong line
else if(message > 0.008) {
message = message.toFixed(3);
function var1Count (){
var1++;}
var1Count();
$("#" + irrelevant var + " .element1 span").text(message);
}
function testCount (){
count++;
}
testCount();
// This starts the process again but on the next item in the list using the variable count
$(".myButton").click (something);
document.getElementsByClassName("myButton")[count].click();
更多格式:$$
答案 1 :(得分:0)
对于TYPO3版本8.7,我必须覆盖TYPO3.CMS/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Date.html
。
使用lib.contentElement.partialRootPaths.30 = EXT:my_extension/Resources/Private/Partials/
将印刷稿中的路径设置为新的部分,我想也需要tt_content.header = < lib.contentElement
来使配置与标题相关。
到新部分的路径将是my_extension/Resources/Private/Partials/Header/Date.html