[%# Page playlist.html %] [%- IF ajaxRequest -%]

            [% PROCESS ajaxRequest.txt page = 'playlist' %]

[%- ELSE -%] [% pagetitle = BLOCK %] [%- playermodel | string %] : [% "PLAYLIST" | string -%] [%- END -%] [%- browse = '0' music = '0' playlist = '1' status = '0' setup = '1' -%] [%- PROCESS pageheader.html thispage = 'playlist' -%]

[% "CURRENT_PLAYLIST" | string %][% IF playlistname %][% playlistname %][% END %] ([% IF myClientState; myClientState.playlist.size; END; %] [% "SONGS" | string %])
[% IF pageinfo.totalpages > 1 %] [% PROCESS pagebar pageinfo.path = 'playlist.html' prefix = 'header_' %] | [% PROCESS pagebarheader prefix = 'header_' %][% END %]

[% IF cansave %] [% "SAVE" | string %] | [% "DOWNLOAD" | string %] | [% "CLEAR" | string %] [% END %] [% IF not cansave %] [% END %]

[% IF not playlist_items %]
[% "EMPTY" | string %]
[% END %] [%- statusroot_old = statusroot; statusroot = 'playlist.html'; -%] [% firstItem = pageinfo.startitem %] [% FOREACH item = playlist_items; PROCESS status_list.html firstItem = firstItem ; END; %] [%- statusroot = statusroot_old -%]

[% IF pageinfo.totalpages > 1 %]

[% PROCESS pagebar prefix = 'footer_' %] | [% PROCESS pagebarheader prefix = 'footer_' %]

[% END %] [%# /Page playlist.html %] [% PROCESS pagefooter.html %] [% END %]