orderby=Leadingroles

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

orderby=Leadingroles

Post by 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: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: orderby=Leadingroles

Post by 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: 303
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: orderby=Leadingroles

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

I understand,
It is not possible :|

Thank you Dave ;)

Post Reply