1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RM 1.0 [RM] Resource Sorting

Discussion in 'Resource Manager Support' started by FredC, Apr 10, 2013.

  1. FredC

    FredC Well-Known Member

    Was wondering if there was a way to sort resources alphabetically as a tab?
     
  2. Fufu

    Fufu Well-Known Member

    Click-able Ascending and Descending arrows would be a nice feature.
     
    otto likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    I believe a tab for this could be added with a template edit.
     
    otto likes this.
  4. Bob

    Bob Well-Known Member

    you'll need to make 2 simple template edits (too 2 different templates).

    TEMPLATE = resource_index

    Find this:
    HTML:
            <ol class="tabs">
                <li class="{xen:if '{$order} == "last_update"', active}"><a href="{xen:link resources, '', 'type={$typeFilter}'}">{xen:phrase latest_updates}</a></li>
                <li class="{xen:if '{$order} == "resource_date"', active}"><a href="{xen:link resources, '', 'order=resource_date', 'type={$typeFilter}'}">{xen:phrase newest_resources}</a></li>
                <li class="{xen:if '{$order} == "rating_weighted"', active}"><a href="{xen:link resources, '', 'order=rating_weighted', 'type={$typeFilter}'}">{xen:phrase top_resources}</a></li>
                <li class="{xen:if '{$order} == "download_count"', active}"><a href="{xen:link resources, '', 'order=download_count', 'type={$typeFilter}'}">{xen:phrase most_downloaded}</a></li>
            </ol>

    Add this in the position you want:
    Code:
    <li class="{xen:if '{$order} == "title"', active}"><a href="{xen:link resources, '', 'order=title', 'direction=asc', 'type={$typeFilter}'}">{xen:phrase title}</a></li> 

    TEMPLATE = resource_category

    Find this:
    HTML:
            <ol class="tabs">
                <li class="{xen:if '{$order} == "last_update"', active}"><a href="{xen:link resources/categories, $category, 'type={$typeFilter}'}">{xen:phrase latest_updates}</a></li>
                <li class="{xen:if '{$order} == "resource_date"', active}"><a href="{xen:link resources/categories, $category, 'order=resource_date', 'type={$typeFilter}'}">{xen:phrase newest_resources}</a></li>
                <li class="{xen:if '{$order} == "rating_weighted"', active}"><a href="{xen:link resources/categories, $category, 'order=rating_weighted', 'type={$typeFilter}'}">{xen:phrase top_resources}</a></li>
                <li class="{xen:if '{$order} == "download_count"', active}"><a href="{xen:link resources/categories, $category, 'order=download_count', 'type={$typeFilter}'}">{xen:phrase most_downloaded}</a></li>           
            </ol>
    Add this in the position you want:
    HTML:
    <li class="{xen:if '{$order} == "title"', active}"><a href="{xen:link resources/categories, $category, 'order=title', 'direction=asc', 'type={$typeFilter}'}">{xen:phrase title}</a></li>
     
    otto, Wulfspider, bt012ss and 3 others like this.
  5. Ludachris

    Ludachris Well-Known Member

    I imagine making it the default sort order is a little more difficult?
     
    otto likes this.
  6. TBDragon

    TBDragon Active Member

    hope its easy cuz i was thinking to ask about make the default order by the date post or by title

    also i wana know does the title ordering accept non-english lang !?
     
  7. otto

    otto Well-Known Member

    I also interested in how to make this as the default order. Any solution?
     
  8. otto

    otto Well-Known Member

    TBDragon likes this.
  9. otto

    otto Well-Known Member

  10. otto

    otto Well-Known Member

    Last edited: Aug 29, 2014
  11. otto

    otto Well-Known Member

  12. Phil

    Phil Active Member


    Is this working on the 1.5 Version ?

    Thanks.
     
    otto likes this.

Share This Page