Accessing nested_get variables within asset list type format


(Birdg) #1

Hi,

 

We are using 4.16.0.

 

I am trying to access a GET variable that is being passed to a nested asset. The nested asset is an asset list which is nested into a standard page.

 

I want to print the GET variable within the "Default Format" Type Format in the asset list but it always returns nothing. I have tried using %globals_get_xxx% and %nested_get_xxx% but neither work.

 

Is there any way to do it?

 

Thanks,

 

Graham

 


(Bart Banda) #2

Does %nested_get_xxx% keyword print anything if you put it in the page contents of the asset listing? 


(Birdg) #3

Hi Bart,

 

Yes, it works fine in the Page Contents. It also works fine if the asset list is nested with a specific Paint Layout.

 

The problem I hit then is that I am passing an ID to the asset list but keywords to retrieve the asset don't seem to work.

 

Within the Paint Layout, %nested_get_profile_id% does work but:

 

%globals_asset_name:nested_get_profile_id% doesn't work

%nested_get_profile_id^as_asset:asset_name% doesn't work

%globals_asset_name^replace_keywords:{nested_get_profile_id}% doesn't work (although I don't think the syntax is quite right)

 

I am trying to get details from the asset with the ID that I passed through.

 

Any thoughts?

 

Thanks,

 

Graham


(Tom Chadwin) #4

Hi Graham

 

Have you confirmed that the nested variable fails to come through if you don't use any modifiers on it? I had exactly this issue, and ended up applying the modifiers to the value I send as the GET var - in the field of the nested asset - rather than modifying it in the nested asset bodycopy. Like you, I could not get modifiers to work at all there.

 

Let us know if that works for you

 

Tom

 

Edit: I think %nested_get_profile_id% would be the one to use.


(Birdg) #5

Hi Tom,

 

Thanks for the suggestion but it doesn't come through even when unmodified. It makes it as far as the Page Contents but not all the way into the Type Formats.

 

Thanks again,

 

Graham


(Bart Banda) #6

Hmm, might be the version you are on, just tested on 4.18.3 and works as expected. There might have been some bugs fixed during the version you are on which is causing it not to work :(


(Birdg) #7

Hi,

 

Thanks for the info. We were working on a dev environment. Just on the off-chance, we tried it on our live environment and the GET variable is passed through to the Type Formats as expected, so there must be a difference between them (they are both 4.16.0).

 

G


(Hopkinsd1) #8

Hi,

 

Replying on behalf of Graham.

 

Its still currently not working.  We can get the GET variable to pass between Asset listings when they are displaying standard pages as their 'Asset types to list'.  However when we then change one of the asset listings to list 'Data source record lists' from a 'LDAP data source' we are then unable to access the GET variables. 

 

Thanks


(Tom Chadwin) #9

I don't suppose this is a limitation related to shadow assets, is it?


(Bart Banda) #10

There shouldn't be, as the type format should still work the same if you are printing information that is not related to the assets you are listing at all. Hopkins, is this happening on your 4.16.0 system as well?

I found this bug that was fixed around that version which may or may not be related to your issue. http://bugs.matrix.squiz.net/view_bug.php?bug_id=6449


(Birdg) #11

Hi Bart,

Looks like that bug is exactly it. Thanks for tracking that down.


We’ll get the system upgraded and try again.


Thanks again,


Graham


(Birdg) #12

Also, just to clarify, there was in fact no difference between the two 4.16.0 systems. It was user error. :slight_smile: