Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

<%loop msgs_list%> -- To List Only Unread Messages

Quote Reply
<%loop msgs_list%> -- To List Only Unread Messages
Hi,

In the

<%loop msgs_list%>

I would want to list only the Unread Messages (say i create a new templates msgs_list_new.htm, msgs_list_include_new.htm etc and link to them). How to do it? Only the UNREAD MESSAGES ARE LOOPED and rest ignored.

Thnx

Anup
Quote Reply
Re: [anup123] <%loop msgs_list%> -- To List Only Unread Messages In reply to
Hi,

I tried <%if msgstrack_status eq 'New'%><%loop msgs_list%><%endloop%><%endif%>

it does list only the "Unread Messages" but the problem is wrt the msgs_toolbar (the navigation links at the bottom of msms_list and also the row color and msgs position).

The toolbar lists all the pages.

The Row color does not alternate as per the "Unread List"

The message Position remains on the respective pages.

How could I overcome this? If a new globals is needed please do let me know the template global which i have to insert.

Thnx

Anup
Quote Reply
Re: [anup123] <%loop msgs_list%> -- To List Only Unread Messages In reply to
Unfortunately it's not easy to do directly from the templates, even with a global - you could use something like:

<%unless msgtrack_status eq 'New'%><%nextloop%><%endif%>

which would skip non-New messages, but as you mentioned this doesn't work very well because of the toolbar and colors - both are based on the full message count, whether you are displaying all of them or not. Some pages of messages could potentially be empty, which would look very odd.

2.2.0 will have a new "Status" search option - so to do the list you're attempting, you would just add a link to a message search for new messages in the current folder.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com