I am having trouble accessing the additional GET variable which I am passing to a nested asset listing. The set up is
The asset listing is nested on standard page and I pass seven GET variable using the "Send the following additional GET variables to the asset:" area
Within the Page Content of the asset listing I am trying using the GET variables using the form %globals_get_% but the values for the variables are not displaying when I preview the standard page.
Do I need to use a form other than %globals_get_% to retrieve the variables?
I am not sure this will work in the way you are wanting. I am pretty sure that putting in get variables for nested assets could only be used for things like dynamic parameters of asset listings.
[quote]
I am not sure this will work in the way you are wanting. I am pretty sure that putting in get variables for nested assets could only be used for things like dynamic parameters of asset listings.
I could be totally wrong though.
[/quote]
global keywords are replaced at the end of page rendering, so they are no longer in the context of the asset listing. So this is correct. If you can get them evaluated before (eg in a paint layout condition say) they do work.
In theory you could make a non global keyword to replace them.
I have set up nested asset listings that display get variables, i bled through the eyes trying to do it as you describe. The variables needed to be in the url and viola the keywords in the nested listing worked. Nic is right, the dynamic root node replacement can use the get by setting the replacement using a session var that matches your get. I believe the passing of variables in nested content has been extended in one of the latest releases, cant remember which one or if it will fix the problem but maybe a dev could chime in with some info…
[quote]
I believe the passing of variables in nested content has been extended in one of the latest releases, cant remember which one or if it will fix the problem but maybe a dev could chime in with some info…
[/quote]
Chime / ding
Perhaps the functionality referred to is a result of Bug 3523: %nested_asset_% keywords not working - fixed in 3.18.11 and 3.20.2. This also fixes use of Asset level (%asset_…%) keywords which was not implemented at the time.
Thanks Mark, from the bug report it looks like 3.22.2 is the version that introduces what I was thinking of. I was trying to pass the current asset id to the nested listing with %asset_assetid% in a 3.18 build.
For those interested…
[quote]Bug #3523 %nested_asset_% keywords not working
To replicate: create an asset listing with a replacement root node of the get variable "root" say.
Create a page that nests it in, and add an additional get variable "root", and set it to %nested_asset_assetid% - this should make the root node of the nested asset listing the asset listing itself. However when we preview we get an assertion error saying '%nested_asset_assetid%" is not a valid asset ID' as the keyword has not been replaced.
Note also that straight %asset_% keywords are not replaced either (their appears to be partial code for this but the replacements are missing). Global keywords work fine.[/quote]
Notable comments in this bug are;
[quote]by cupreti the May 4th, 2009, 10:24
When attempted to fix %asset_% keyword replacement bug, it doesn't gets replaced as 'expected' though programatically its correct. This part never have been worked-out in previous versions, hence is a feature rather than a bug.[/quote]
Followed by a string of bug fixed then bug unfixed notes then finally;
[quote]Asset keywords now supported
by mbrydon the Jul 9th, 2009, 11:24
The use of %asset_…% keywords in Nested Content cell types (as mentioned in this report) is now supported from 3.22.2 onwards as this was requested as a feature for that release.[/quote]