Keyword for .length equivalent


(Nick Papadatos) #1

Matrix Version: 5.5.4

Hi squiz folk.

I have a search asset and in the default format I want to be able say (in a condition) if the results are less than or equal to 4 then use layout A else use layout B.

Layout A and B just uses different HTML structure…

example:

    %begin_result_number^lt:5%
      Apply layout A
    %else_asset%
     Apply Layout B
    %end_asset%

Is it possible? I cannot find the equivalent keyword %result_count% in the default format?

cheers
Nick


(Harinder Singh) #2

how about this one?

%asset_list_position%


(Nick Papadatos) #3

Clever harinder.sigh - never thought to use that keyword

Cheers
NickyP