Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Adding an “S”

Quote Reply
Adding an “S”
How would I write a global to add an s if more than 1 link is present. It just doesn’t seen right (or look right) to say, “1 new links”. By adding a global I could use “link <%if < 1%><%sadd%><%endif%>” Well you get the idea. I am sure this has been addressed before but I was unable to find it. Thanks.
Quote Reply
Re: [jgkiefer] Adding an “S” In reply to
If you mean new.html you can do:

There <%if total > 1%>are<%else%>is<%endif%> <%total%> new link<%if new > 1%>s<%endif%>

I _think_ I have that right.
Quote Reply
Re: [RedRum] Adding an “S” In reply to
Thanks for pointing me in the right direction.

It turns out to be -
There <%if total > 1%>are<%else%>is<%endif%> <%total%> new link<%if total > 1%>s<%endif%>

All it needed was "if total" instaed of "if new" for the "s".
Quote Reply
Re: [jgkiefer] Adding an “S” In reply to
Oops that was a typo :)