为collective.perseo包添加Schema.org属性
项目描述
简介
此包定制main_template、plone.path_bar、plone.global_sections、plone.header视图以插入Schema.org属性(itemscope、itemtype和itemprop)。
警告!安装此包时,main_template、plone.path_bar、plone.global_sections、plone.header视图将被定制,以插入Schema.org属性。这些资源在其他主题和皮肤中的定制可能被禁用。
如果您不想安装collective.perseoschema包,但仍然需要Schema.org属性,以下是在您的主题中可以进行的定制:
在以下位置定制plone.path_bar视图
path_bar.pt的第2行,添加itemprop属性,itemprop="breadcrumb"
<div id="portal-breadcrumbs" itemprop="breadcrumb" ...
在以下位置定制plone.global_sections视图
section.pt的第1行,在标签nav中添加itemscope和itemtype属性,itemtype="http://schema.org/SiteNavigationElement"
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement"> ... </nav>
在以下位置定制plone.header视图
portal_header.pt的第2行,添加itemscope和itemtype属性,itemtype="http://schema.org/WPHeader"
<div id="portal-header" itemscope="itemscope" itemtype="http://schema.org/WPHeader"> ...
在以下位置定制sunburst_templates / main_template
第18行,从Plone SEO配置中获取“向body标签添加itemscope和itemtype属性”字段的值,并从SEO选项卡获取“itemtype属性”字段的值
... <html xmlns="http://www.w3.org/1999/xhtml" tal:define=" ... perseo_context nocall: context/@@perseo-context; itemscope_itemtype python:perseo_context.perseo_itemscope_itemtype(); itemtype python:perseo_context.perseo_itemtype()" ...
第61行,添加itemscope和itemtype属性(根据先前值)
... <body ... tal:attributes="... itemscope python:itemscope_itemtype and 'itemscope' or None; itemtype python:itemscope_itemtype and itemtype or None"> ...
第94行,添加itemprop属性,itemprop="mainContentOfPage"
... <div id="content" itemprop="mainContentOfPage"> ...
第149行,添加了itemscope和itemtype属性,itemtype="http://schema.org/WPSideBar"
... <div id="portal-column-one" itemscope="itemscope" itemtype="http://schema.org/WPSideBar" ...
第161行,添加了itemscope和itemtype属性,itemtype="http://schema.org/WPSideBar"
... <div id="portal-column-two" itemscope="itemscope" itemtype="http://schema.org/WPSideBar" ...
第176行,添加了itemscope和itemtype属性,itemtype="http://schema.org/WPFooter"
... <div itemscope="itemscope" itemtype="http://schema.org/WPFooter"> <div tal:replace="structure provider:plone.portalfooter" /> </div> ...
致谢
在Andrea Pernici的支持下开发。collective.perseo是基于quintagroup.seoptimizer的。
变更日志
0.1.1 (2011-12-14)
修复了seo标签中字段的布局 [fdelia]
0.1.0 (2011-10-19)
初始发布
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源代码分发
collective.perseoschema-0.1.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 36b13cd32541173fcd45c15db3355066ec874443b73b937c0c9a73be6182d325 |
|
MD5 | bece1906d6413325ce40c5425386650b |
|
BLAKE2b-256 | 9cf3f6facbcbaeee75bcbd7d1f51b6345178eeecfb94c03792e278bea8224874 |