Keyword replacement when GET variable has special character

(Michael Wilson) #1

Matrix Version:

I have a REST Resource nested on a page and I’m supplying some Additional GET Parameters. One of these parameters takes the form: f.Category%7CFBCategory=

Placing f.Category%7CFBCategory in the Variable Value field breaks the page as does f.Category|FBCategory. Any ideas how to handle special characters here?


(Iain Simmons) #2

I might be misunderstanding what you’re trying to achieve, but shouldn’t that be the Variable Name (key)?

Also, what is the keyword you’re using in the REST Resource to get the value of that variable?

You could try doing the following in JS processing part of the REST Resource to see what is happening:


(Michael Wilson) #3

My REST Resource has the following:


Then the page nesting this asset provides the params:

collection wagga-web
profile embed
query %globals_get_query%
start_rank %globals_get_start_rank%
f.Category FBCategory

(Iain Simmons) #4

Perhaps try:^as_url_string%

(Michael Wilson) #5

That didn’t work unfortunately. Also I noticed in my pasted table of settings above, the last row hasn’t pasted very well. It should have been:

f.Category|FBCategory %globals_get_f.Category%7CFBCategory%

(Iain Simmons) #6

What if that one is %globals_get_f.Category|FBCategory%?

(Michael Wilson) #7

Same error. Breaks the search and I can see the globals_get keyword replacement on the page so it hasn’t been able to execute the replacement.

(Bart Banda) #8

The values you are getting as %globals_get_X% you don’t need to pass as dynamic variables in the Nested Asset, you could simply just add these directly to the REST asset’s URL field to see if that makes a difference?


Note that %globals_get^as_url_string% in the REST asset URL field will look for query strings at the frontend top level, not from your nested asset passing them down.