我們使用WYSIWYG編輯器進行產品描述,其中有HTML標籤。然而,Magento正在使用產品頁面標題中的元內容描述中的所有內容,這使人們在社交網絡上共享頁面時變得很難看,因爲描述是由原始HTML標記組成的。擺脫Magento中產品頁面元描述中的標籤?
例如,在this page,meta描述是這樣的:
<meta name="description" content="<div class="short-description">
<div class="std">
<ul>
<li>Colored bridesmaid dress made in lace and taffeta</li>
<li>The top is made of ivory French corded lace, the skirt is made of colored taffeta</li>
<li>Straight front neckline, V Back</li>
<li" />
我的問題是我怎麼能擺脫標籤,這樣只有文字是在描述中使用?我不知道要看哪個模板。任何幫助,將不勝感激!謝謝!
我們需要在產品說明中使用ul列表或ol列表。我們直接從Magento後臺控制檯目錄 - >管理產品添加/編輯產品。有沒有更好的方法? –
我已經用新解決方案更新了答案。 – Marius
在最後的php回聲我用html_entity解碼所以&不會得到像這樣的輸出'echo html_entity_decode($ description)' – asherrard