I was about to answer “no” but it turns out the answer is “kinda”.
I hadn’t previously found a solution to “list multiple levels of assets with only keywords”, I always resorted to SSJS solutions like Hierarchical asset list with server side javascript (SSJ) - #3 by JohnGill
Sample asset setup
Normally you get stuck at the point where you can get attributes of the children (like your example)
%asset_children^as_asset:asset_name% = ["Page Contents","A","B","C"]
or you can get the assetids of the grandchildren
%asset_children^as_asset:asset_children% = [["25098"],["24743","24744","24745"],["24746","24747","24748"],["24749","24750","24751"]]
but you can’t get the attributes of the grandchildren, because by that point you’ve an array of arrays of assetids and you can’t use ^as_asset on such a structure.
What I hadn’t considered before is the possibility of operating on this array structure as a string. It turns out that the ^as_csv modifier will turn the above “array of arrays” into something like
%asset_children^as_asset:asset_children^as_csv%
"0"
"25098"
"24743","24744","24745"
"24746","24747","24748"
"24749","24750","24751"
if you could remove the newlines, add some commas, and strip the quotes, you’d be left with something that you might be able to turn back into an array. I don’t think this can be done with the basic ^replace modifier so you’ll need to create a Regular Expression asset and use the ^preg_replace modifier
I created #25100 with the following set up
so new lines become commas and double quotes get removed. That leaves you with
%asset_children^as_asset:asset_children^as_csv^preg_replace:25100%
0,25098,24743,24744,24745,24746,24747,24748,24749,24750,24751
which you can turn back into an array with ^explode. Once it’s an array again, you can do another round of ^as_asset
%asset_children^as_asset:asset_children^as_csv^preg_replace:25100^explode:,^as_asset:asset_name%
["Content Container","Apple","Acacia","Aardvark","Banana","Balsa","Baboon","Cherry","Cypress","Camel"]
Leaving you with a final flattened array of attributes of the grandchild assets. This isn’t quite what you’re after because it’s only the grandchildren, not the children. You might be able to tweak it to include the child level as well.



