Hi,
I couldn't find another topic on this, so I apologise if this is a repeat:
I have an folder of ServiceProviders, each containing one or more ContactDetails. I want to create an asset list (or search result page) listing each of the (relevant) ServiceProviders as well as each of the ContactDetails for each ServiceProvider.
The problem that I am experiencing is that my second level asset listing (for the ContactDetails) picks up the AssetID for the page being displayed rather than the current ServiceProvider from the first level asset listing.
Is there some way that I can pass the asset ID of the ServiceProvider to the second level asset listing?
Thanks for any help,
Bruce
If there is always at least one ContactDetails asset, then I would recommend switching to a Custom Grouping list, grouped by Parent asset. Then, you'll get the ServiceProvider in the Group Format and each ContactDetails in the type format.
Thanks Avi, I'll give that a try.
The other way to do this is to use the first asset listing to list the Folders with %asset_contents% and then using a Paint Layout on the folder to list the ContactDetail(s) for each Folder. If your Folder assets already list their ContactDetails, you'd only need a single asset listing.
Unfortunately I already have a paint layout for the ServiceProviders which displays all the (metadata) details. I am now trying to create a directory view with a limited set of the metadata together will a list of all the ContactDetails available for each service provider.
I tried the Custom Grouping List, which worked perfectly but for one small point - It does not provide an A - Z page structure. Is there any way to set the Custom Grouping List to show a A - Z page list rather than a 1 - 5 page list?
Thanks,
Bruce
I also tried to use the Custom Grouping for my search results. In this case the search only applies to the listed items (i.e. the ContactDetails) and misses the data in the ServiceProvider 
So there is no way for me to pass the current asset id from the ServiceProvider asset list to the nested ContactDetails asset list?
I thought we were talking about Asset Listing, not Search? Could you perhaps explain in more detail what you're trying to achieve so that we can work out the best way to do it? I'm leaning towards listing asset contents, which then (via a paint layout) list their own contents. This works for search results as well.
Ok here is the scenario. Our customer wants to allow public users to register for a user account (with email activation). After the user is logged in they are able to register ServiceProviders (two types with similar metadata) and multiple locations (ContactDetails) per ServiceProvider.
Once these new entries have gone through a workflow process they will be made live and appear in the public directory. Public users can search the directory (See http://waikato.webhealth.co.nz/page/waikato_4.php for an example) or they can view a full directory (http://waikato.webhealth.co.nz/page/waikato_4.php?directory_listing=all). The second case is essentially a search result with all fields empty, i.e. showing all results.
The search results display a minimal set of fields from the ServiceProvider as well as a list of locations (ContactDetails) for that service provider. When the user clicks on the link for the ServiceProvider they get a paint-layout page with all of the (meta) data for the ServiceProvider as well as a list of each of the locations for that ServiceProvider. As far as I can tell I cannot have two different paint-layouts for the ServiceProvider, i.e. one for the search results/asset listing and one for the normal view?
I just tried doing this using a trigger on "Asset Access", but this trigger is not fired when an asset is accessed via a search results or asset listing, so no luck there.
The Paint Layout used by an asset listing is the one applied to the *Listing* not to the assets being listed. You should be able to use this to your advantage when creating the list/search page.
Edited to add -- Bruce, I'm flying around the country this week, but I'm back in the office on Monday next week if you want to discuss this over the phone. :)
Hi Avi, thanks for your help so far.
Unfortunately the Paint Layout applied to an asset listing does not apply to the assets listed. Even if it did apply to the assets listed, there is still the problem that the Paint Layout needs to nest an asset listing for the ContactDetails and there is currently no way to dynamically select the root node for the second asset listing based on the current element in the paint layout.
The Paint Layout applied to the Asset Listing should be painted for listed assets if you use the %asset_contents% keyword. What version of Matrix are you running? I can have a play on my local system to see if I can get it to work as well. Though, I saw your bug report and that's a nifty solution. :)