我使用的是Plone v4.1.2,我想知道是否有一种方法可以在页面的行中包含多个作者?我有两位作者被列入所有权,但只有一位作者被列在了副标题中。是否可以将多个作者列入副标题?
我想署名看起来是这样的:由第一作者和第二作者
- 最后修改2012年1月11日下午1时53分 - 历史
更新 - 谢谢大家对您的回复。我设法通过这个(我从来没有用过tal之前)的方式搞砸了。我按照Giaccamo的建议编辑了plone.belowcontenttitle.documentbyline,并在途中学习了一些关于tal的内容。这里是做什么,我需要的代码(这将替换现有TAL:创建者构造):
<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>
这使用户ID上署名,而不是全名。我试图获得全名,但经过一段时间没有成功,我决定我可以用userid。
好吧,我要试试这个。它看起来有点吓人,但我从来没有害怕尝试。 – Andy 2012-01-12 18:26:10