Jump to content

How toshow icon or button when a user is not logged


pippo67

Recommended Posts

Hello,

I created a custom comments module. I would like to display the trash icon in the comment only for the user is logged in. I created this code in the tpl file that deals with viewing the comments. According to your experience is correct?

<table>
  {foreach from=$comments item=$row}
   <tr> 
     <td>
       {if $logged}
            {$row[‘firstname’]} {$row[‘lastname’]}
             <i  class='fa fa-trash-0'></i>
       {else}
            {$row[‘firstname’]} {$row[‘lastname’]}   
       {/if}
     </td>
  </tr>
</table>

Thanks in advance and sorry for the english.

Note:
What does the yellow star next to the topics mean?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...