Forums / Developer / To prove to be typical of a node

To prove to be typical of a node

Author Message

Rafael Andres Gonzalez Lopez

Thursday 11 August 2005 12:01:26 pm

Good, he wanted to prove to be the author and the date of publication of a file(or node). Manage to show the date of the current object, with this instruction:

{$:node.object.published|l10n(shortdate)}

Nevertheless he wanted to prove to be the author of the above mentioned file (or of the above mentioned node). I imagine that the instruction is similar to that of the date, nevertheless even I have not found it... I am grateful for any help... Thank you.

David Eriksson

Friday 12 August 2005 12:39:15 am

I'm not 100% I'm understanding what you're looking for, but soemthing like this?

{def $current_user=fetch('user', 'current_user')}
{if eq($current_user.contentobject_id, $node.object.owner_id)}
  ...
{/if}

If you just want to print the owner:

{$node.object.owner.name}

/David

Rafael Andres Gonzalez Lopez

Friday 12 August 2005 5:26:57 am

Thank you David this last instruction was the one that he needed.

Now achieve what was searching... Thank you.

Rafael Gonzalez