0

我還沒有成功在我的typo3網站中實現豐富網頁摘要。基本上我已經試圖包裝html標籤,幷包含元代碼片段,但無濟於事,只是一連串的網站錯誤。Typo3帶有輸入錯誤的豐富片段

page.meta.itemprop.name = name 
 
page.meta.itemprop.description = description 
 
page.meta.itemprop.image = http://www.example.com/img/01.png

的HTML代碼是下面

<html itemscope itemtype="http://schema.org/Organization"> 
 
<meta itemprop="name" content="name"> 
 
<meta itemprop="description" content="description"> 
 
<meta itemprop="image" content="http://www.example.com/image.png">

應該使用什麼樣的Typo腳本?

回答

1

這對我有效。

config.htmlTag_stdWrap { 
 
    setContentToCurrent = 1 
 
    cObject = COA 
 
    cObject { 
 
     1 = TEXT 
 
     1.value = itemscope 
 
     1.noTrimWrap = | | | 
 
     2 = TEXT 
 
     2.value = itemtype="http://schema.org/Organization" 
 
     2.noTrimWrap = | | | 
 
\t \t 3 = TEXT 
 
     3.value = lang="en" 
 
     wrap = <html | > 
 
    } 
 
} 
 
page { 
 
    headerData { 
 
    4 = TEXT 
 
    4.value (
 
<meta itemprop="name" content="Your site Name"> 
 
<meta itemprop="description" content="Your site description"> 
 
<meta itemprop="image" content="http://www.example.com/img/01.png"> 
 
    ) 
 
    } 
 
}

+0

請接受你自己的答案 – pgampe 2015-02-10 22:32:47

+0

如何將包內添加動態的名稱和說明,通過Typo腳本的任何想法? Fab 2015-02-11 22:54:35

+0

是的,您可以使用stdWrap data或dataWrap來插入當前頁面上下文中的值。 – pgampe 2015-02-13 17:09:32