mxmCounter 是一個方便好用的 Zope 瀏覽計數器 product,假設我們已經裝好了。

為了要在 AboutBox slot 裡多列一條 mxmCounter 的項目,我們要先自訂 PloneRoot/portal_skins/plone_portlets/about_slot,在::

tal:define="review_state wf_state"
tal:condition="review_state">


State



tal:content="review_state"
tal:attributes="class review_state"
i18n:translate="">
private


tal:condition="python:here.isExpired(here)">
( i18n:translate="time_expired">
expired
)




之後加上這一段::



Visited


tal:replace="python:here.mxm_counter.count(here)"
/> times


然後別忘了修改 PloneRoot 的 left_slots property,把 AboutBox slot 加進去::

here/about_slot/macros/aboutBox

完工。
Posted by yungyuc at 18:27, 0 comment, 0 trackback.
Add a trackback
Add a comment

Your name. (required)

Your personal website. (optional)

Your email address. Will not show in page. (suggested, but optional)

Text format is "Plain Text".

Enter "ALAyO"
© hover year to navigate month: powered by django