Post by pg111 on Jan 25, 2021 16:02:30 GMT
Hi everybody,
Basically, my CATVids database contains two kinds of records: movies that exist as a video file on a hard disk and movies that exist only on a DVD (or any similar media).
The problem is that for all my movies that exist as a video file on my HDD I have not yet had the opportunity of entering the link to the actual video file. I did it for some but there are still plenty that are pending this info.
So, for all my movies flagged as existing as a video file on my HDD, I have two kinds:
– those who don't (yet) have a video file linked to them (Video A)
– those who already have a a video file linked to them
(Video B)
I'm not sure how I can write xml code that allows me to distinguish between these two kinds.
I'd like to tweak Person_Credits.xsl so it displays as in the attached screenshot:
This is the record for Michael Douglas.
The column of interest is red arrowed: "Fichier vidéo", which means "Video File".
It is supposed to indicate whether a video file is available for the movie in the record.
So far so good.
But how in xsl can I code so as to differenciate between Video A and Video B records?
I tried this code snippet, but I stumble on a difficulty: How to refer to an existing video file?
Here is my code snippet:
custom17 is the field for "Video File", ie the red arrowed column in my screenshot.
My logic is the following:
If custom17 is not empty (a video file exists for the movie record) then two possibilities: either video filename has not yet been entered in Multimedia/Video field and then let us display just "Yes"; or it has and then let us display the small PlayVideo.gif icon as an indicator that the video can be played from the movie record (not from the Person page itself, but from several places on other pages).
I'm not sure if above is clear. I'm not even sure there is not a better route to achieve my desired result.
Many thanks in advance to anyone that will help me.
Cheers and take care.
Basically, my CATVids database contains two kinds of records: movies that exist as a video file on a hard disk and movies that exist only on a DVD (or any similar media).
The problem is that for all my movies that exist as a video file on my HDD I have not yet had the opportunity of entering the link to the actual video file. I did it for some but there are still plenty that are pending this info.
So, for all my movies flagged as existing as a video file on my HDD, I have two kinds:
– those who don't (yet) have a video file linked to them (Video A)
– those who already have a a video file linked to them
(Video B)
I'm not sure how I can write xml code that allows me to distinguish between these two kinds.
I'd like to tweak Person_Credits.xsl so it displays as in the attached screenshot:
This is the record for Michael Douglas.
The column of interest is red arrowed: "Fichier vidéo", which means "Video File".
It is supposed to indicate whether a video file is available for the movie in the record.
So far so good.
But how in xsl can I code so as to differenciate between Video A and Video B records?
I tried this code snippet, but I stumble on a difficulty: How to refer to an existing video file?
Here is my code snippet:
<xsl:choose>
<xsl:when test="contentsdata/custom17=''">
<xsl:text>Yes</xsl:text>
</xsl:when>
<xsl:when test="contentsdata/custom17!=''">
<IMG BORDER="0" SRC="PlayVideo.gif"/><xsl:text> </xsl:text>
</xsl:when>
</xsl:choose>
custom17 is the field for "Video File", ie the red arrowed column in my screenshot.
My logic is the following:
If custom17 is not empty (a video file exists for the movie record) then two possibilities: either video filename has not yet been entered in Multimedia/Video field and then let us display just "Yes"; or it has and then let us display the small PlayVideo.gif icon as an indicator that the video can be played from the movie record (not from the Person page itself, but from several places on other pages).
I'm not sure if above is clear. I'm not even sure there is not a better route to achieve my desired result.
Many thanks in advance to anyone that will help me.
Cheers and take care.