Comment Asset Listing Help

Continuing on my Matrix journey I really need a solution to the following situation:


Users create comments that are dynamically created in 20 different folders

I create an asset listing page that displays the last comment made live in the system like:


    

"%asset_attribute_comment%"

Comment by %asset_name% on %asset_created_readable%


That's fine, however I need to print out the name of the containing folder. Something like:

    [b]%asset_parent%[/b]

"%asset_attribute_comment%"

Comment by %asset_name% on %asset_created_readable%


Tried everything! :blink:

If you're only printing a single comment, why not group it by Parent Asset? Then you can print out the name of the parent group. That's about the only way to do this. Matrix doesn't have keywords for asset parents, because an asset can potentially have several parents.

You can list parents by using an up the tree listing. So you have to have a paint layout for comments applied that includes this, rather than just doing it in the type format of the asset listing.

Cool, what is the keyword to do this?

Cool got it…

    
%group_listing%

Huzzah!

Ok, so this works great untill you try sort the order of the assets (something I only discovered now). I need to list the latest asset created in the system contained in those 20 folders. No matter what I do the order of how that asset listing is controlled is by the group format. How would I fetch the lastest asset from those 20 folders and display it on the page? Right now it's fetches the latest folder that I created:






Is there any way to create a trigger that when an asset is created in the system the Created Date of the containing Folder Parent is updated too?


No, there is no trigger.

You will need a single asset listing with 20 root nodes so it looks in all 20 folders. You can then sort them all by created date and find the most recent.

Except he wants to print the name of the Parent asset, which is only possible in Custom Grouping mode.

It's impossible I think - but could be useful for future builds.