add a global variable to store filter

I need it to be able to have access to category and tag names into main layouts (for specifying custom page title).