Jump to content

Featured Replies

Posted

I am playing around with the Featured record's template, and I wonder if there is a way to add more sorting options than what you set on the database level?

Solved by opentype

Go to solution
  • Solution

Sorting is only available with the listing templates, not with those frontpage/article views. One could however create listing templates that look like those frontpage/article views. 

  • Author

So if I want both top-rated and newest, then my options are to create blocks for whichever I don't have on the database level?

33 minutes ago, opentype said:

One could however create listing templates that look like those frontpage/article views. 

This is what I do regularly. Example for recordRow in Listing Template:

<div id='elTable_{$table->uniqueId}1' data-role="ipsGrid">
    {{$articles = $rows;}}
    {{foreach $articles as $id => $record}}
        <div class="ipsBox ipsSpacer_top{{if $record->hidden()}} ipsModerated{{endif}}" data-rowID="{$record->_id}">
            {template="entry" app="cms" location="database" group="FXPages_Blog_List_Category_Articles" params="$record, $record::database(), $table"}
        </div>
    {{endforeach}}
</div>

I just replace everything belonging to the row with an entry from Featured template.

Edited by Sonya*

Recently Browsing 0

  • No registered users viewing this page.