I need to select between this block of code, and one for a MIDI file, such as this:
<div class="details"><span class="labels">Mid Size:</span> {LINKMIDI} - Download <a href="{LINKDLW}">MID</a></div> I need to select the MIDI size based on the category. However, I am finding this very difficult to accomplish. I tried doing this with CATID without success.
Create a category field on the add fields page, say "midiwav" as a selector with the options midi and wav, and select the desired option by editing each category. Then use <IF {CATMIDIWAV} is midi>midi stuff<OTHERWISE>wav stuff</IF>
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Need proper IF statement
Member
Usergroup: Customer
Joined: Mar 01, 2007
Total Topics: 14
Total Comments: 19
Take a look at this code I use to display the WAV size of a file:
<div class="details"><span class="labels">Wav Size:</span>
{LINKWAV} - Download <a href="{LINKDLW}">WAV</a></div>
I need to select between this block of code, and one for a MIDI file, such as this:
<div class="details"><span class="labels">Mid Size:</span>
{LINKMIDI} - Download <a href="{LINKDLW}">MID</a></div>
I need to select the MIDI size based on the category. However, I am finding this very difficult to accomplish. I tried doing this with CATID without success.
Suggestions?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
<IF {CATID} is x>midi<OTHERWISE>wav</IF>
Member
Usergroup: Customer
Joined: Mar 01, 2007
Total Topics: 14
Total Comments: 19
I will be having many MIDI categories, thus, many category ID's to put in the code you gave me. Is there a better way, than to use CATID?
I have many WAV categories too, so it is about 50/50, and extra code size that is unnecessary. Sorry for the troubles
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Create a category field on the add fields page, say "midiwav" as a selector with the options midi and wav, and select the desired option by editing each category. Then use <IF {CATMIDIWAV} is midi>midi stuff<OTHERWISE>wav stuff</IF>