PDA

View Full Version : How to make "isband" work?



meley
09-05-2007, 01:04 AM
Hello All!
I wish to print (beside the artist picture and after the entry "stereo or mono" the date born (if a person) or the date formed (if a band). Underneath that, I wish to display "date died" (if a person) or date disbanded (if a band)! I can't get the code to determine if I'm dealing with a band or a person. This is what I have so far:

<!-- ====================== Show Birth and Death ====================== -->

</dax:if>
<dax:if(dateformed)>
<p><span class="proplabel"><dax:if(isband)>Formed<dax:else>Born</dax:if></span>:
<span class="propvalue"><dax:dateformed/></span></p>
</dax:if>
<dax:if(datedisbanded)>
<p><span class="proplabel"><dax:if(isband)>Disbanded<dax:else>Died</dax:if></span>:
<span class="propvalue"><dax:datedisbanded/></span></p>
</dax:if>
</dax:if>

<!-- ================================================== ================ -->


Please help ... Thanks!
Melvin

andrei_c
09-11-2007, 02:39 PM
Hi Melvin,

I copied and pasted your code in my theme and it seems to work correctly after 2 tiny changes:

1) First </dax:if> is misplaced, it has no corresponding <dax:if>. I removed it.

2) There's a space inside <dax:else>, I guess it's just a forum posting artefact.

What is the problem that you see with this code? I can help, but first I must know what the problem is!

Andrei

meley
09-11-2007, 08:05 PM
Andrei,
Thanks for attempting to assist me. On the left side of the artist's photo, I have the following for an individual artists:

Category: Jazz
Format: Album
Date: 1975
Genre: Jazz
Live/studio: studio
Audio: stereo
Born: 9/15/1928
Died: 8/8/1975

If the group is a band, I want the label to display the last two lines as following:

Formed: 9/15/1928
Disbanded: 8/8/1975

I pickup the dates from the "Artist Profile Page" but I just can't get the code to switch its output between "Person" or "Band." I hope this helps. Thanks again ...