Forum Discussion
<#assign pageSize = 5 />
<#assign truncateLimit = 15 />
<#assign badges = '' /> <#-- let's keep empty the badges cause we don't know if we need them -->
<#assign badges_i = '' />
<#assign notificationPageURL = community.urls.tapestryPrefix + '/notificationfeed/page' />
<#assign _notificationsCount = restadmin( '/users/id/' + user.id + '/notifications/count' ).value?number />
<#assign notifications = [] />
<#assign allowed = [ 'kudos', 'mentions', 'solutions', 'badge', 'rank' ] />
<#assign notificationsPage = 1 />
<#assign usedNotifications = [] />
<#function getNotifications>
<#assign page = notificationsPage * pageSize />
<#assign nots = restadmin( '/users/id/' + user.id + '/notifications?restapi.response_style=view&page_size=' + page ).notifications />
<#if ( nots?size > 0 )>
<#list nots.notification as notification>
<#if ( ( !usedNotifications?seq_contains( notification_index ) ) && ( allowed?seq_contains( notification.notification_type ) ) && ( notifications?size < pageSize ) )>
<#assign notifications = notifications + [notification]>
<#assign usedNotifications = usedNotifications + [notification_index]>
</#if>
</#list>
<#if ( notifications?size < pageSize && ( ( _notificationsCount - page ) > 0 ) )>
<#assign notificationsPage = notificationsPage + 1 />
<#assign go = getNotifications() />
</#if>
</#if>
<#assign nots = restadmin( '/users/id/' + user.id + '/notifications?restapi.response_style=view&page_size=' + page ).notifications />
<#return 1 />
</#function>
Related Content
- 11 years ago
- 6 months ago
- 3 years ago