Page 1 of 1

orderby=Leadingroles

Posted: Wed Sep 13, 2017 8:23 pm
by Alex Ivanovich
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) -->

Re: orderby=Leadingroles

Posted: Sat Sep 16, 2017 2:30 pm
by LotsOCds
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.

Re: orderby=Leadingroles

Posted: Sat Sep 16, 2017 4:09 pm
by Alex Ivanovich
I understand,
It is not possible :|

Thank you Dave ;)