Page 1 of 1

[Solved] custom01 and publisher

Posted: Sun Oct 16, 2016 6:50 am
by Alex Ivanovich
I would like to see the field "custom 01" (Contents.xls) in BookBrowse, only if the field "publisher" is present
"Arnoldo Mondadori Editore" or "Walt Disney Company Italy"

thank you ;)

I tried this code but it does not work :roll:

Code: Select all

<td>
	<table width="100%"  border="1" cellpadding="2" cellspacing="0" bordercolor="#FF0000">
	<xsl:choose>
<xsl:when test="publisher/lookupdata/publisher='Arnoldo Mondadori Editore' or publisher/lookupdata/publisher='Walt Disney Company Italia' ">
<tr>
         <th>
		  <FONT COLOR="WHITE" SIZE="1">
            <a href="http://coa.inducks.org/story.php?c={custom01}"><xsl:value-of select="custom01"/></a>
          </FONT>
		  </th>
</tr>
      </xsl:when>
      </xsl:choose>
      </table>
</td>	

Re: custom01 and publisher

Posted: Thu Oct 20, 2016 10:10 pm
by Alex Ivanovich
not working :|

Code: Select all

<td>
	<xsl:if test="custom01!=''">
      <table width="100%"  border="1" cellpadding="2" cellspacing="0" bordercolor="#FF0000">
        <tr>
          <th>
		  <FONT COLOR="WHITE" SIZE="1">
            
			<xsl:choose>
			<xsl:when test="publisher/lookupdata/publisher='Charlton Comics'">
          <a href="http://www.comicbookdb.com/search.php?form_search={title}&form_searchtype=FullSite"><xsl:value-of select="custom01"/><xsl:text> Comic Book DB </xsl:text></a>
           </xsl:when>
		   
		   <xsl:when test="publisher/lookupdata/publisher='Arnoldo Mondadori Editore' or publisher/lookupdata/publisher='Walt Disney Company Italia' ">
         <a href="http://coa.inducks.org/story.php?c={custom01}"><xsl:value-of select="custom01"/></a>
           </xsl:when>
		  </xsl:choose>
		   
		    </FONT>
		  </th>
        </tr>
      </table>
	  </xsl:if>
    </td> 

Re: custom01 and publisher

Posted: Fri Oct 21, 2016 2:38 pm
by LotsOCds
not working
Please be more specific. What is not working? What is it doing that is not correct?

The code looks okay. It depends upon the exact result you want.

Re: custom01 and publisher

Posted: Fri Oct 21, 2016 3:40 pm
by Alex Ivanovich
I would like to see the field, "Custom01"(present in the template Contents.xsl) in BookBrowse
with these conditions

1) if the "publisher" field contains "Arnoldo Mondadori Editore" display the field
"Custom01" and the link
<a href="http://coa.inducks.org/story.php?c={custom01}">

2) if the "publisher" field contains "Charlton Comics" show the field
"Custom01" and the link
<a href="http://www.comicbookdb.com/search.php?f ... e=FullSite">

with this code and see the field "custom01 ' see foto First code 1
and the link
<a href="http://coa.inducks.org/story.php?c={custom01}">

Code: Select all

<td>
	<xsl:if test="custom01!=''">
      <table width="100%"  border="1" cellpadding="2" cellspacing="0" bordercolor="#FF0000">
        <tr>
          <th>
		  <FONT COLOR="WHITE" SIZE="1">
            <a href="http://coa.inducks.org/story.php?c={custom01}"><xsl:value-of select="custom01"/></a>
          </FONT>
		  </th>
        </tr>
      </table>
	  </xsl:if>
    </td> 

with this code not visible field "custom01 ' see foto Second code 2

Code: Select all

  <td>
   <xsl:if test="custom01!=''">
      <table width="100%"  border="1" cellpadding="2" cellspacing="0" bordercolor="#FF0000">
        <tr>
          <th>
        <FONT COLOR="WHITE" SIZE="1">
           
         <xsl:choose>
         <xsl:when test="publisher/lookupdata/publisher='Charlton Comics'">
          <a href="http://www.comicbookdb.com/search.php?form_search={title}&form_searchtype=FullSite"><xsl:value-of select="custom01"/><xsl:text> Comic Book DB </xsl:text></a>
           </xsl:when>
         
         <xsl:when test="publisher/lookupdata/publisher='Arnoldo Mondadori Editore' or publisher/lookupdata/publisher='Walt Disney Company Italia' ">
         <a href="http://coa.inducks.org/story.php?c={custom01}"><xsl:value-of select="custom01"/></a>
           </xsl:when>
        </xsl:choose>
         
          </FONT>
        </th>
        </tr>
      </table>
     </xsl:if>
    </td> 

Re: custom01 and publisher

Posted: Sun Oct 23, 2016 3:27 pm
by LotsOCds
Inspecting the code I see nothing wrong. Please look at the XML file to see that the publisher is exactly "Arnoldo Mondadori Editore". Look for extra spaces between the words or other non-printable characters. Extra spaces do not show in the Explorer display, you must look in the XML to be sure. If you see no differences try changing the publisher to "Charlton Comics". Does that work properly?

Re: custom01 and publisher

Posted: Sun Oct 23, 2016 4:13 pm
by Alex Ivanovich
Solved ;)

Thanks Dave ;)