A-Z listing of CSV data source records

I've recently implemented 2 asset listings for displaying CSV data source record sets that came from CSV form submission logs. One asset listing shows just the name of all the form submissions. The names are linked to the second asset listing which displays more of the fields for each individual submission. both asset listings are identical in root nodes and sorting except the second asset listing only lists one asset per page.


This is working great (Thanks Anthony and Nick for your help). Now the client wants the first asset listing to break up the display of all subs by letter. The listing is currently sorted alphabetically by name, but they want just the 'A' subs on the first page, then the 'B' subs etc with links to A, B, C pages instead of next and previous.



The problem seems to be that the data source record set assets are all shadow asset children of the CSV data source. I want the publishing of these subs to be as streamlined as possible and I don't want to have to move all these subs into A, B, C folders - which might not work anyway since they are shadow assets.



Doing asset sorting by name messed up the relation between the 2 asset listings - they use %asset_position% to know how to link between the 2 asset lisitngs.



Asset grouping by name also didn't work, then there was only one asset per group because of the unique names of the submissions, instead of listing all the A's.



Is there a way to do what I am after?

Stupid question. Did you try the A-Z listing option?

[quote]
Stupid question. Did you try the A-Z listing option?

[/quote]



Oh yeah, I forgot to mention that. The A-Z listing option brought back no results.

I think it's the shadow assets that are causing the sorting option not to work, but perhaps a dev could confirm that.


I really don't think you are left with alot of options on grouping them by first letter, unless the A-Z listing could be made to work - even then I have my doubts that the asset position would be preserved, I think that the first item on each page might be classed as position 1. I'll have to test that when I have more time. If the A-Z could be made to work, I think it would be a development issue.



So, looking at what options you have currently you could probably implement some kind of javascript solution. My thoughts are perhaps have each item in an li and iterate through them re-writing a new some new grouping html and attaching some controls to allow users to hide/show the appropriate sub-list. It would degrade nicely into the unordered list without javascript, and provide some instant navigation to the user… however, it means having to list everything on the one page, which if there are alot of results could mean the initial page load would be more lengthy than a paginated asset listing.

[quote]
I think it's the shadow assets that are causing the sorting option not to work, but perhaps a dev could confirm that.

[/quote]



Correct. The A-Z listing options of asset listings only works for real assets because it does a custom DB query to return grouped results much more quickly than checking names manually.



It could be modified to work with shadow assets (like the CSV data source ones) by checking each shadow asset individually. But this would require development.

[quote]
Correct. The A-Z listing options of asset listings only works for real assets because it does a custom DB query to return grouped results much more quickly than checking names manually.



It could be modified to work with shadow assets (like the CSV data source ones) by checking each shadow asset individually. But this would require development.

[/quote]



Thanks Greg and Anthony. The client only wanted this option if it was not too much effort to implement and this sounds like it's not going that way. I've got a working solution at the moment and I think that will do for this job.

Richard


Have a look at this thread http://forums.matrix.squiz.net/index.php?showtopic=6717



I am surprised Nic didn’t offer this up here but I am sure the JS would help you in your situation too.

[quote]
I am surprised Nic didn't offer this up here but I am sure the JS would help you in your situation too.

[/quote]



Eh, I am slacking today. It is Friday, and I am tired. :slight_smile: