Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 类型3:覆盖元标记(tx_新闻)_Typo3_Typoscript_Tx News - Fatal编程技术网

Typo3 类型3:覆盖元标记(tx_新闻)

Typo3 类型3:覆盖元标记(tx_新闻),typo3,typoscript,tx-news,Typo3,Typoscript,Tx News,我目前正在为我的网页进行搜索引擎优化。因此,我想获得page.meta.author/title/description。。。来自当前在浏览器中打开的新闻文章。如果没有设置,则应返回到常量中配置的默认值 我正在做这样的事情: page.meta { author < plugin.tx_news.currentNewsItem.author // I don't know what to write here author.ifEmpty = {$page.meta.autho

我目前正在为我的网页进行搜索引擎优化。因此,我想获得page.meta.author/title/description。。。来自当前在浏览器中打开的新闻文章。如果没有设置,则应返回到常量中配置的默认值

我正在做这样的事情:

page.meta {
   author < plugin.tx_news.currentNewsItem.author // I don't know what to write here
   author.ifEmpty = {$page.meta.author}
}

我感谢所有的帮助。

正如@Ghanshyam Bhava在评论中建议的那样,我在我的设置打字脚本中使用了以下内容:

[globalVar = GP:tx_news_pi1|news > 0]
    page {
        config {
            noPageTitle = 0
        }
        headerData {
            776 >
        }
        meta {
            description >
            author >
            keywords >
        }
    }
[end]
我只需要修改headerdata编号,因为我使用的是SEO_Basics扩展,而且我还必须确保扩展的层次结构在模板中是正确的


对于页面元标记,我使用了常量打字脚本中定义的默认值,当然,只要不满足上述条件。

这可能会对您有所帮助,谢谢!经过一些修改,效果非常好。
[globalVar = GP:tx_news_pi1|news > 0]
    page {
        config {
            noPageTitle = 0
        }
        headerData {
            776 >
        }
        meta {
            description >
            author >
            keywords >
        }
    }
[end]