Asset Listing Dynamic Parameter - Problem with Array of specific asset IDs or selection group


(M L Sanders) #1

Hi All

I'm setting up an Asset Listing that needs to pull assets out of several different folders.

I'm using Dynamic Parameters so I can reuse the listing.

 

I've chosen 'Array of specific asset IDs or selection group' in the Dynamic parameters, and set up a GET Variable Name.

 

When I nest the Asset listing, I create a new variable, which I call by the same name as used in the asset listing definition.

 

I'm not sure, though, how to proceed; how to specify several different Asset IDs to become the target.

 

I naturally (!) thought of creating one variable for each of the 'target' folders - each variable would be called the same name, and the value would be set to a single Asset ID. No luck: no results found anywhere.

 

I then deleted all the variables except 1, but I still get no results.

 

I know the folder I'm targeting has at least one asset that should be picked up, and I'm confident that I've set up the other aspects of the Asset Listing correctly. I've tested this by changing the Dynamic Parameter from 'Array of specific assets...' to 'Replacement Root node....' and the expected assets are returned.

 

Does anyone know how I'm supposed to set up an 'Array...' of dynamic replacement root nodes, or whether it works at all?

 

Thanks......


(Nic Hubbard) #2

Have you tried using a comma separated list as the Array?


(M L Sanders) #3

Yes. I also tried ensuring that the name of the variable had () at the end!!!

No luck :(

 

It seemed to me that if I chose the 'array' version of the dynamic parameter, no results were ever returned....whatever I tried.

 

As always, Nic, thanks for your response!


(Nic Hubbard) #4

Yes. I also tried ensuring that the name of the variable had () at the end!!!

No luck :(

 

It seemed to me that if I chose the 'array' version of the dynamic parameter, no results were ever returned....whatever I tried.

 

As always, Nic, thanks for your response!

 

How are you entering your array? Should just be 123,1345,5325,2535  something like that...


(M L Sanders) #5

Yep, that's how I did the comma separated array.

I've finally bitten the bullet and created a new asset list for each set of root nodes. You should see this asset; I've never nested so many instances of asset listings in one page - it must be almost 30. I'm too old for this :)


(Nic Hubbard) #6

Yep, that's how I did the comma separated array.

I've finally bitten the bullet and created a new asset list for each set of root nodes. You should see this asset; I've never nested so many instances of asset listings in one page - it must be almost 30. I'm too old for this :)

 

There wasn't a way you could do with with one asset listing? Make sure to test the /_performance for that page to see how it is performing. Nesting that many could be a big performance hit.


(Joel Porgand) #7

I don't think you can specify an array of root nodes to use. It's a single root node or an array of assets. 

 

Do you actually need it to be generate a dynamic result set based on user input? Or were you just trying to create a re-usable part?


(Nic Hubbard) #8

I don't think you can specify an array of root nodes to use. It's a single root node or an array of assets.

 

Naw, you can use a comma separated list of IDs. It isn't just for a single root node.


(Joel Porgand) #9

 

Naw, you can use a comma separated list of IDs. It isn't just for a single root node.

 

Ah, I was just assuming based on the wording of the property, never actually had a use case where I needed to try it. 

 

But yes, I gave it a quick test and it works just fine, my apologies for the misinformation. 


(Tim Davison) #10

Yeah, Nic's right.  I've done this many times before successfully, both ways.

 

Replacement root nodes, just use a comma separated list (if you are using a nested div just put the comma-separated list in the variable field value, don't redefine the same field several times).  Make sure all id's are children of the static root node.  Use this mode to list all of the children assets of the selected roots.

 

Array of specific id's is somewhat different in that it doesn't traverse the tree.  Use this mode if want only the assets you specify and none of their children.  Again, all assets must be children of the static root node.

 

Also, you can't mix and match.  Choose replacement root or Array of specific, you can't have both.

 

If you're having issues, %root_nodes% keyword is helpful to make sure the correct roots are getting through.  If the nodes are correct but still no assets showing then there's something else preventing the assets from showing (e.g. double-check status or type filtering, static root node, link matching, basically anything that prevents assets from showing).