A-Z Asset listings


(Nic Hubbard) #1

I would like to list user assets using an asset listing A-Z format. Currently, it seems that the A-Z is determined by just the asset name (for a user that is first name then last name). So, for user assets, the grouping is determined by the first name because that is what comes first in the asset name. So, if I wanted to A-Z format to be based off of the LAST name, it does not work.


Has anyone one this before? Or know a way to get this working?


(Mark Brydon) #2

[quote]I would like to list user assets using an asset listing A-Z format. Currently, it seems that the A-Z is determined by just the asset name (for a user that is first name then last name). So, for user assets, the grouping is determined by the first name because that is what comes first in the asset name. So, if I wanted to A-Z format to be based off of the LAST name, it does not work.


Has anyone one this before? Or know a way to get this working?[/quote]

Edit: Sorry, I forgot about the "Page List". The example I provided earlier (given below) will only work if you don't want a Page List. At the moment it looks like using the A-Z Listing in this manner is not possible.



The list can be sorted by an Asset attribute, in this case "Last Name", from the "Asset Sorting" screen.



Firstly set your list to use "Standard Grouping" and then proceed to the "Asset Sorting" screen to configure the "Sorting by Asset Attribute Value" option.

The free text field is an alias to use - I would suggest "Last Name" funnily enough. Commit this screen and then in the same location a list of attribute values for the User asset type will be shown. Set this to "Last Name" and at the bottom set the Default Sorting to match the alias you provided. The list will then be sorted by the last name.


(Nic Hubbard) #3

[quote]Edit: Sorry, I forgot about the "Page List". The example I provided earlier (given below) will only work if you don't want a Page List. At the moment it looks like using the A-Z Listing in this manner is not possible.


The list can be sorted by an Asset attribute, in this case "Last Name", from the "Asset Sorting" screen.



Firstly set your list to use "Standard Grouping" and then proceed to the "Asset Sorting" screen to configure the "Sorting by Asset Attribute Value" option.

The free text field is an alias to use - I would suggest "Last Name" funnily enough. Commit this screen and then in the same location a list of attribute values for the User asset type will be shown. Set this to "Last Name" and at the bottom set the Default Sorting to match the alias you provided. The list will then be sorted by the last name.[/quote]



Yeah, I am able to sort by last name using an asset listing in standard list formatting, but using the A-Z option does not use any other attribute but asset name to separate them into pages.



Bummer. :frowning: I was wanting to build a people directory this way…


(Robin Shi) #4

[quote]Yeah, I am able to sort by last name using an asset listing in standard list formatting, but using the A-Z option does not use any other attribute but asset name to separate them into pages.


Bummer. :frowning: I was wanting to build a people directory this way…[/quote]



Just to suggest. If you print %user_attribute_last_name% only in type formats, do you get the same order?


(Nic Hubbard) #5

No, this won't effect it. The sorting for A-Z must be done internally in the code. I might dig around to see if I can create a fix for this....

(Greg Sherwood) #6

Yes, A-Z sorting is done in the main DB query for optimisation. Otherwise it would need to pull out the values of each asset and then sort in PHP. Adding in a feature to sort A-Z by any attribute or metadata field is quite possible, but will be slower than the current feature now as we will have to batch get all that info and sort in PHP. For metadata, we can basically forget it due to the additional processing it needs to do so support keywords and date formats.


(Duncan Robertson) #7

Just a thought, probably not a good one, I’ve solved something very similar using Jquery tablesorter plugin. It really depends on what need you’re fulfilling listing with surname.


(Daniel Nitsche) #8

Or there is always ye old DB Data Source, which would allow you to grab the assets in the exact way you need them (after some SQL wrangling).


(Nic Hubbard) #9

Yes, but, I am very very bad at SQL queries, so, not sure this is something I have time to do right now... :(

(Mark Nearhos) #10

I would like to do exactly what the original post was asking about, ie an A-Z Asset listing of user assets by last name.


Although 3 years old, this thread is all I've been able to find on the matter.



Has there been any new solutions to this over the last 3 years (eg using the JS-API)?



Or are the options still:

[list=1]


  • asset list of the all users and then client-side js to separate alphabetically by surname
    [*]DB Data Source and "SQL wrangling"