我正在使用Plone v4.1.2,我想知道是否有办法在页面的第一行中包含多个作者?我在所有权中列出了两位作者,但在署名中只列出了一位作者.
我希望byline看起来像这样:
作者:第一作者和第二作者 - 最后修改时间:2012年1月11日下午01:53 - 历史
更新 - 感谢大家的回复.我设法搞砸了我的方式(我之前从未使用过tal).我按照Giaccamo的建议编辑了plone.belowcontenttitle.documentbyline,并设法在此过程中学习了一些关于tal的内容.这是执行我需要的代码(这取代了现有的tal:creator构造):
<span>
by
<span class="documentCreators"
tal:condition="context/Creators"
tal:repeat="creator context/Creators"
i18n:translate="text_creators">
<span tal:define="cond1 repeat/creator/start; cond2 repeat/creator/end"
tal:condition="python: not cond1 and not cond2" >, </span>
<span tal:define="cond1 repeat/creator/start; cond2 repeat/creator/end"
tal:condition="python: not cond1 and cond2" > and </span>
<tal:i18n i18n:translate="label_by_author">
<a href="#"
tal:attributes="href string:${context/@@plone_portal_state/navigation_root_url}/author/${creator}"
tal:content="creator"
tal:omit-tag="python:view.author() is None"
i18n:name="author">Roland Barthes</a>
</tal:i18n>
</span>
</span>
Run Code Online (Sandbox Code Playgroud)
这会将userid放在byline而不是全名.我试图获得全名,但经过一段时间没有成功,我决定我可以使用userid.
plone ×1