Jukebox/w3tpl

From HypertWiki
Revision as of 22:13, 8 March 2009 by Woozle (talk | contribs) (testing album display)

The Hypertwin Jukebox

is under construction, but here are all the artists <hide>

=========
functions
=========

<func GetArtists>

 <for db=audioferret table="Artists" sort="sort, name" name=ar>
   <let name=ar_name val="@row.ar.name" />
   <let name=outFunc append>
  • </let>
   <let name=outFunc append vars>[$@row.ar.id$ </let>
   <let name=outFunc append copy=ar_name />
   <let name=outFunc append>]</let>
 </for>

</func>

<func GetAlbums>

 <let name=sqlFilt vars>ID_Artist=</let>
 <let name=sqlFilt append copy=doArtist />
 <for db=audioferret table="Albums" where=$sqlFilt sort="sort, name" name=al>
   <let name=al_name val="@row.al.name" />
   <let name=outFunc append>
  • </let>
   <let name=outFunc append copy=al_name />
 </for>

</func>

================
build the output
================

Get the input arguments: <let name=doArtist copy=@query.artist /> <let name=doAlbum copy=@query.album /> Always show the artists: <call GetArtists />

<let name=out>

Artists</let>

<if flag=doArtist>

 <let name=doTitles val=1 />

</if> <if flag=doArtist>

 <let name=out append> || Albums</let>

</if> <if flag=doTitles>

 <let name=out append> || Titles</let>

</if> <let name=out append>

</let> <let name=out append copy=outFunc /> <if flag=doArtist>

 <call GetAlbums />
 <let name=out append> || </let>
 <let name=out append copy=outFunc />

</if> <let name=out append>

</let>

===============
show the output
===============

</hide><get name=out />