Before the end of 2017 the board will be down for a brief period of time for an upgrade.
Past experience says less than 30 minutes but I can't predict the future.
Also, there is a high probability that the forum will move to a different host, but that will not happen in 2017.
Thanks,
Doug

[Solved] custom01 and publisher

Discuss using and your tips/tricks for BookCAT
User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

[Solved] custom01 and publisher

Postby Alex Ivanovich » Sun Oct 16, 2016 6:50 am

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>   
Last edited by Alex Ivanovich on Sun Oct 23, 2016 8:18 pm, edited 2 times in total.

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: custom01 and publisher

Postby Alex Ivanovich » Thu Oct 20, 2016 10:10 pm

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}&amp;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>

User avatar
LotsOCds
Posts: 173
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: custom01 and publisher

Postby LotsOCds » Fri Oct 21, 2016 2:38 pm

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.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: custom01 and publisher

Postby Alex Ivanovich » Fri Oct 21, 2016 3:40 pm

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?form_search={title}&amp;form_searchtype=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}&amp;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>
Attachments
First code 1.png
First code 1
First code 1.png (190.99 KiB) Viewed 374 times
Second code 2.png
Second code 2
Second code 2.png (144.26 KiB) Viewed 374 times

User avatar
LotsOCds
Posts: 173
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: custom01 and publisher

Postby LotsOCds » Sun Oct 23, 2016 3:27 pm

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?
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 287
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: custom01 and publisher

Postby Alex Ivanovich » Sun Oct 23, 2016 4:13 pm

Solved ;)

Thanks Dave ;)


Return to “Using BookCAT”

Who is online

Users browsing this forum: No registered users and 1 guest