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

RM 1.1 is it possible to sort category by title ?!

TBDragon

Active member
#1
hi every one

is it possible to sort category by title ?!

if yes then how ?! hope there is way without implementing an addon to do it >_<
 

Mike

XenForo developer
Staff member
#2
It may be possible with a template modification, but alternatively it would require an add-on. It's not a built-in option.
 

TBDragon

Active member
#3
It may be possible with a template modification, but alternatively it would require an add-on. It's not a built-in option.
thanks @Mike for answering so i need to play in this code ?! or in another one ?!
HTML:
<xen:foreach loop="$categories" value="$_category">
                <li class="{xen:if '{$_category.resource_category_id} == {$selectedCategoryId}', selected}">
                    <a href="{xen:link resources/categories, $_category}" {xen:if $_category.category_description, 'title="{xen:helper striphtml, $_category.category_description}" class="Tooltip" data-tipclass="resourceCategoryTooltip"'}>{$_category.category_title}</a>
                    <span class="count">{xen:number $_category.resource_count}</span>
                </li>
            </xen:foreach>

thanks again
 

Tracy Perry

Well-known member
#4
is it possible to sort category by title ?!

if yes then how ?! hope there is way without implementing an addon to do it >_<
I can't remember who/where it was (think it was a @Chris D post) that I saw that added a tab to the resource manager to sort by Title.

In both the resource_category and resource_index templates look for
Code:
<ol class="tabs">
            <li class="{xen:if '{$order} == "last_update"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order='}">{xen:phrase latest_updates}</a></li>
            <li class="{xen:if '{$order} == "resource_date"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=resource_date'}">{xen:phrase newest_resources}</a></li>
            <li class="{xen:if '{$order} == "rating_weighted"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=rating_weighted'}">{xen:phrase top_resources}</a></li>
            <li class="{xen:if '{$order} == "download_count"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=download_count'}">{xen:phrase most_downloaded}</a></li>
        </ol>
and change to
Code:
<ol class="tabs">
            <li class="{xen:if '{$order} == "last_update"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order='}">{xen:phrase latest_updates}</a></li>
            <li class="{xen:if '{$order} == "resource_date"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=resource_date'}">{xen:phrase newest_resources}</a></li>
            <li class="{xen:if '{$order} == "rating_weighted"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=rating_weighted'}">{xen:phrase top_resources}</a></li>
            <li class="{xen:if '{$order} == "download_count"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=download_count'}">{xen:phrase most_downloaded}</a></li>
           <li class="{xen:if '{$order} == "title"', active}"><a href="{xen:link resources, '', 'order=title', 'direction=asc', 'type={$typeFilter}'}">{xen:phrase title}</a></li>
        </ol>
What you end up with is similar to
screenshot.png
 

TBDragon

Active member
#6
I can't remember who/where it was (think it was a @Chris D post) that I saw that added a tab to the resource manager to sort by Title.

In both the resource_category and resource_index templates look for
Code:
<ol class="tabs">
            <li class="{xen:if '{$order} == "last_update"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order='}">{xen:phrase latest_updates}</a></li>
            <li class="{xen:if '{$order} == "resource_date"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=resource_date'}">{xen:phrase newest_resources}</a></li>
            <li class="{xen:if '{$order} == "rating_weighted"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=rating_weighted'}">{xen:phrase top_resources}</a></li>
            <li class="{xen:if '{$order} == "download_count"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=download_count'}">{xen:phrase most_downloaded}</a></li>
        </ol>
and change to
Code:
<ol class="tabs">
            <li class="{xen:if '{$order} == "last_update"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order='}">{xen:phrase latest_updates}</a></li>
            <li class="{xen:if '{$order} == "resource_date"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=resource_date'}">{xen:phrase newest_resources}</a></li>
            <li class="{xen:if '{$order} == "rating_weighted"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=rating_weighted'}">{xen:phrase top_resources}</a></li>
            <li class="{xen:if '{$order} == "download_count"', active}"><a href="{xen:link resources, '', '_params={$pageNavParams}', 'order=download_count'}">{xen:phrase most_downloaded}</a></li>
           <li class="{xen:if '{$order} == "title"', active}"><a href="{xen:link resources, '', 'order=title', 'direction=asc', 'type={$typeFilter}'}">{xen:phrase title}</a></li>
        </ol>
What you end up with is similar to
View attachment 71033

thanks but this is not what i want ^_^

i want the categories not the resources

any way i make an addon and @Chris D help me with it , it have some issue but iam ok with that its work anyway ^_^
i was thinking of giving some time to play with so i can put more options to let the user choose how the order will be if iam done with it i will publish it here ^_^