将schema.org属性添加到collective.perseo包
collective.perseoschema的Python项目详细描述
简介
这个包自定义主模板和plone.path_bar、plone.global_部分, 用于插入schema.org属性(itemscope、itemtype和itemprop)的plone.header视图。
警告!安装这个包的主要模板和plone.path_bar,plone.global_部分, 将自定义plone.header viewlets,以插入schema.org属性。定制 可以禁用其他主题和皮肤中的这些资源。
如果您不想安装collective.perseoschema包,但仍然需要schema.org 属性,以下是可以在主题中进行的自定义。
plone.path_bar viewlet的自定义如下:
path_bar.pt的第2行,添加了itemprop属性,itemprop=“breadcrumb”:
<div id="portal-breadcrumbs" itemprop="breadcrumb" ...
plone.global_sections viewlet的自定义如下:
PT段1号线, 在tag nav中添加了itemscope和itemtype属性,itemtype=“http://schema.org/SiteNavigationElement”:
<nav itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement"> ... </nav>
plone.header viewlet的自定义如下:
portal_header.pt的第2行, 添加了itemscope和itemtype属性,itemtype=“http://schema.org/WPHeader”:
<div id="portal-header" itemscope="itemscope" itemtype="http://schema.org/WPHeader"> ...
sunburst_模板/main_模板的定制,在以下几点:
第18行,取“向body tag添加itemscope和itemtype属性”字段的值, 来自plone seo配置,以及seo选项卡中“itemtype attribute”字段的值:
... <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> ...
学分
在安德烈·佩尔尼奇的支持下发展起来的。 collective.perseo松散地基于quintagroup.seoptimizer。
更改日志
0.1.1(2011-12-14)
- 修正了seo选项卡中字段的布局[fdelia]
0.1.0(2011-10-19)
- 初始版本