Add display_choice macro

Display custom messages depending on a boolean integer value.
This commit is contained in:
Roan Horning 2022-08-04 19:31:35 -04:00
parent 284b92d80b
commit e250581f3c
Signed by: rho_n
GPG Key ID: 234AEF20B72D5769
2 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,7 @@
<h2><a href="series/<!--% zero_pad_left(series.id) %-->.html"><!--% series.name %--></a></h2>
<ul>
<li>Number of episodes: <!--% series.number_of_episodes %--></li>
<li>Open/closed: open</li>
<li>Open/closed: <!--% display_choice(series.private, 'closed', 'open') %--></li>
<li>Date of earliest show: <!--% series.earliest_show %--></li>
<li>Date of latest show: <!--% series.latest_show %--></li>
<li>Series RSS feeds: <a href="hpr_ogg_rss.php?series=38">ogg</a>, <a href="hpr_spx_rss.php?series=38">spx</a>, <a href="hpr_mp3_rss.php?series=38">mp3</a></li>

View File

@ -2,3 +2,8 @@
<!--% USE String(word) %-->
<!--% String.format("%04s") %-->
<!--% END %-->
<!--% MACRO display_choice(choice, display_when_true, display_when_false) BLOCK %-->
<!--% IF choice == 1 %--><!--% display_when_true %-->
<!--% ELSE %--><!--% display_when_false %--><!--% END %-->
<!--% END %-->