Re: Adding name at "last_post_column"
Posted by
Pedro on
Nov 29, 2012; 1:59am
URL: https://support.nabble.com/Adding-name-at-last-post-column-tp7582051p7582102.html
This is a generic solution. Go to your last_post_column macro and edit the "last_node" part like this:
<n.last_node.>
<table class="avatar-table">
<tr>
<td style="padding:0;vertical-align:top;border:none;">
<n.owner.avatar size="small" group="B"/>
</td>
<td style="width:100%;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">
<n.smart_post_link.url>
<text.when_created.short_format/>
</n.smart_post_link.url>
<span class="weak-color nowrap" style="padding-left:.2em">
<t>by <t.author.owner.name truncate="20"/></t>
<br/>
<n.truncate. size="5">
<n.node_message_as_text />
</n.truncate.>
</span>
</td>
</tr>
</table>
</n.last_node.>
The key here is at lines 14-16, I get the node content and set it's maximum size as 5 characters. Since you know how to coding I think you can organize it as you want. Try it and you will see that it will work on all your apps, if you want something more specific we have to surround it by some "if" blocks.