Forum for discussing general topics related to Couch.
5 posts Page 1 of 1
Is it possible to add some custom field to a cloneable template, which is displayed in the admin list view and which can be used as a list sorting option?

If so, how do I go about that?

TY!
Please see the discussion on <cms:config_list_view> tag in the following post -
viewtopic.php?f=5&t=10241

Hope it helps.
Yeah that's almost perfect thank you.

What I can't seem to work out how to do with it though is allow the custom column header (which displays the content a new field I've added to the template) to be clickable so that the pages are sorted by it - like you can do with the title and date.
In case your custom field is a text one.

Definition:
Code: Select all
<cms:editable type='text'     name='editable_text'      label='Text' search_type='integer' />


Note appropriate use of search_type parameter. With search_type='text' '22' will be higher than '122' when ordered 'desc'.

A config with a custom sortable field. Works for a regular clonable (not nested_pages) template.
Code: Select all
<cms:config_list_view searchable='1' >

    <cms:field 'k_selector_checkbox' />
    <cms:field 'k_page_title' />

    <cms:field 'editable_text' header='My text' sortable='1' />

    <cms:field 'k_comments_count' />
    <cms:field 'k_page_foldertitle' />
    <cms:field 'k_page_date' />
    <cms:field 'k_actions' />   

</cms:config_list_view>
Thank you!!!
5 posts Page 1 of 1