Jukebox/w3tpl: Difference between revisions
From HypertWiki
< Jukebox
m debug code |
turn off page cache -- maybe cache is ignoring URL arguments |
||
Line 29: | Line 29: | ||
===== build the output ===== | ===== build the output ===== | ||
============================ | ============================ | ||
Turn off page cache: | |||
<w3tpl nocache /> | |||
Get the input arguments: | Get the input arguments: | ||
<let name=doArtist copy=@query.artist /> | <let name=doArtist copy=@query.artist /> | ||
<let name=doAlbum copy=@query.album /> | <let name=doAlbum copy=@query.album /> | ||
Always show the artists: | Always show the artists: | ||
<call GetArtists /> | <call GetArtists /> | ||
Line 64: | Line 68: | ||
=========================== | =========================== | ||
</hide><get name=out /> | </hide><get name=out /> | ||
doArtist=<get name= | doArtist=<get name=@query.artist /> |
Revision as of 22:21, 8 March 2009
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
================
Turn off page cache: <w3tpl nocache />
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 /> doArtist=<get name=@query.artist />