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

orderby=Leadingroles

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

orderby=Leadingroles

Postby Alex Ivanovich » Wed Sep 13, 2017 8:23 pm

I would like to enable sorting for the field
orderby = leadingroles

unfortunately it does not work :roll:

this is the code

ContentsList.xsl

Code: Select all

<!-- Cast column (1 di 2) -->
        <td class="list_table_heading">Cast
        <xsl:choose>
              <xsl:when test="data/recordset/sortorder/sortorderitem[1]/field/@dbfld='Leadingroles' and data/recordset/sortorder/sortorderitem[1]/order='D'">
                <a href="orderby=Leadingroles"><xsl:value-of select="/data/fld/contents/leadingroles/leadingrole/@name"/></a><img class="list_sort_d" src="sort_d.gif"/>         
              </xsl:when>             
              <xsl:when test="data/recordset/sortorder/sortorderitem[1]/field/@dbfld='Leadingroles'">
                <a href="orderby=Leadingroles-d"><xsl:value-of select="/data/fld/contents/leadingroles/leadingrole/@name"/></a><img class="list_sort_a" src="sort_a.gif"/>         
              </xsl:when>
              <xsl:otherwise>
                <a href="orderby=Leadingroles"><xsl:value-of select="/data/fld/contents/leadingroles/leadingrole/@name"/></a>     
              </xsl:otherwise>
            </xsl:choose>
          </td>
       
        <!-- Cast column (1 di 2) -->



Code: Select all

<!-- Cast column (2 di 2) -->
  <td class="list_table_fieldvalue">
   <xsl:call-template name="format-cast">
        <xsl:with-param name="cast" select="leadingroles/leadingrole"/>
      </xsl:call-template>
      <xsl:text> - </xsl:text>
      <a href="CMD:VIEWIMAGE:Contents,{contentsid/@unformatted},1"><img width="50" src="{image1/filename}" class="record_pane_image"/></a>
  </td>
  <!-- Cast column (2 di 2) -->

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

Re: orderby=Leadingroles

Postby LotsOCds » Sat Sep 16, 2017 2:30 pm

Alex Ivanovich wrote:I would like to enable sorting for the field
orderby = leadingroles

You cannot sort the way you want using a lookup field in a list template like this. Notice that the default ContentsList template does not allow sorting on the Director field. It is for the same reasons since Director is also a lookup field.
Cheers,
Dave

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

Re: orderby=Leadingroles

Postby Alex Ivanovich » Sat Sep 16, 2017 4:09 pm

I understand,
It is not possible :|

Thank you Dave ;)


Return to “Using CATVids”

Who is online

Users browsing this forum: No registered users and 1 guest