How can I determine if I'm in the List or Document library and I'm not on some page that is inside the document library?
For example if im on the page which is located in the pages and I do:
SPContext.Current.List
I will get a list Pages. So how can I determine?