【发布时间】:2012-05-13 01:05:34
【问题描述】:
由于某些奇怪的原因,我无法将规范标签添加到 opencart 1.5.2.1 产品页面和类别页面。我对 product.php 和 category.php 都进行了更改,但它只是没有显示在查看源代码中。如果我错过了什么,谁能告诉我?
文件已编辑
1) 目录/控制器/产品/product.php 2) 目录/控制器/产品/category.php
添加代码
$this->document->addLink($this->url->link('product/category', 'path=' . $category_id), 'canonical');
之后
$this->document->setKeywords($product_info['meta_keyword']);
【问题讨论】:
标签: php opencart canonical-link