Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter macsag

    (@macsag)

    Thanks!

    Thread Starter macsag

    (@macsag)

    If someone is still interested in sorting by two keys, I have a solution which works almost perfectly for me.

    I store values (prizes, years of prizes) in separate custom fields for a page with a book:
    prize_1 – year_1
    prize_2 – year_2
    prize_3 – year_3 etc.

    and in a single custom field for a page with a literary award:
    prize.

    I create three (or more) loops which output the data in a form of a table.
    <table style=”width:100%” class=”tablesorter”>
    <thead>
    <tr>
    <th>Year</th>
    <th>Author</th>
    <th>Title</th>
    </tr>
    </thead>
    <tbody>
    [pass field=prize]
    [loop type=books field=prize_1 value={FIELD}]
    <tr>
    <td>[field year_1]</td>
    <td>[field author]</td>
    <td>[field title]</td>
    </tr>
    [/loop]
    [loop type=books field=prize_2 value={FIELD}]
    <tr>
    <td>[field year_2]</td>
    <td>[field author]</td>
    <td>[field title]</td>
    </tr>
    [/loop]
    [loop type=books field=prize_3 value={FIELD}]
    <tr>
    <td>[field year_3]</td>
    <td>[field author]</td>
    <td>[field title]</td>
    </tr>
    [/loop]
    [/pass]
    </tbody>
    </table>

    Then I use the “Table Sorter” plugin, which allows to make the table sortable (by simply adding the “tablesorter” class to the table).

    It suits my needs even better then sorting it in a backend, beacause I want my users to be able to sort by a key of their choice.

    I’m not sure it’s exactly what you needed, by my problem is more or less solved.
    Thanks for your help anyway!

    I have another issue with translation. I changed those values in -regions.php, but it seems to work only in admin panel. Country names on the map remain the same.

    Is it possible to translate default English labels which appear on the map?

Viewing 3 replies - 1 through 3 (of 3 total)