Page 1 of 1

another color to my comment

Posted: Mon Feb 21, 2011 6:56 pm
by Sasni
How can I change the color only in my responses in commentlist?
I use i3theme.

this line changes color every second comment.

Code: Select all

<li id="comment-{$comment.id}" class="{cycle values="alt, even"}"> 
...EDIT...
I found the solution

Code: Select all

   <li id="comment-{$comment.id}"  {if $comment.author == 'Sasni'} class="sasni" {else} class="{cycle values="alt, even"}" {/if}>

Re: another color to my comment

Posted: Mon Feb 21, 2011 7:42 pm
by yellowled
Sasni wrote:

Code: Select all

<li id="comment-{$comment.id}"  {if $comment.author == 'Sasni'} class="sasni" {else} class="{cycle values="alt, even"}" {/if}>
That might work for the time being or in your particular situation. If you ever change your username or have additional authors in your blog, it won't.

Code: Select all

<li id="comment-{$comment.id}" {if $comment.author == $entry.author} class="entry_author"{else} class="{cycle values="alt, even"}"{/if}>
is much more bulletproof.

YL

Re: another color to my comment

Posted: Mon Feb 21, 2011 8:15 pm
by Sasni
it works! thanks for your reply.