Share » Forums » Setup & design » How can I get "Last updated" and...

How can I get "Last updated" and "Written by" of an article?

How can I get "Last updated" and "Written by" of an article?

Thursday 23 February 2006 12:28:48 pm - 1 reply

Modified on Thursday 23 February 2006 12:35:01 pm by Leandro Alves

Author Message

andreas spahr

Friday 24 February 2006 10:27:14 am

Hi Leandro,

you can do this in two ways:
first, if you want to use it only for the article class, make an override for the author attribute:

[article_author]
Source=content/datatype/view/ezauthor.tpl
MatchFile=ezauthor.tpl
Subdir=templates
Match[class_identifier]=article

and change the code as you like it in (remove the email....):

<b>Written by</b><br>
{section var=Authors loop=$attribute.content.author_list sequence=array( bglight, bgdark )}
{$Authors.item.name|wash( xhtml )}&nbsp{*$Authors.item.email|wash( email )*}{delimiter},{/delimiter}
{/section}

The second possibility is not to use the author attribute of the article class and use it for all objects / classes:

        
{default content_object=$node.object 
 content_version=$node.contentobject_version_object}
<p>
Published by: {$content_object.owner.name|wash}, {$content_object.published|l10n(datetime)} 

{section name=modified show=and($content_object.is_published|not(), $node.contentobject_version_object.version|gt(1))} 

	<br />Last modified by: {$content_version.creator.name}, {$content_version.modified|l10n(datetime)}
{/section}
</p>

The second code will only display one author ....
Cheers

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu