Basically you can use the token PageFieldValue to use a value on the current page layout. This works if it is a Managed MetaData field. Similarly you can use the PageQueryString to add a value to use in the query. A good example of using these values is
here.