Fixed #13559 -- Added context processor for site

The patch was written originally by Joshua Ginsberg. It was updated by hop and me.
patterns is deprecated, please remove.