product listing and pages
diff --git a/public/js/all-app.js b/public/js/all-app.js
index 026903b..30b3c96 100644
--- a/public/js/all-app.js
+++ b/public/js/all-app.js
@@ -252,8 +252,7 @@
 wn.route=function(){if(wn.re_route[window.location.hash]){var re_route_val=wn.get_route_str(wn.re_route[window.location.hash]);var cur_route_val=wn.get_route_str(wn._cur_route);if(decodeURIComponent(re_route_val)===decodeURIComponent(cur_route_val)){window.history.back();return;}else{window.location.hash=wn.re_route[window.location.hash];}}
 wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
 wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;case"Report2":wn.views.reportview2.show();break;default:wn.views.pageview.show(route[0]);}}
-wn.get_route=function(route){if(!wn.boot){return[window.page_name];}
-return $.map(wn.get_route_str(route).split('/'),function(r){return decodeURIComponent(r);});}
+wn.get_route=function(route){return $.map(wn.get_route_str(route).split('/'),function(r){return decodeURIComponent(r);});}
 wn.get_route_str=function(route){if(!route)
 route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return route;}
 wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();}
diff --git a/public/js/all-web.js b/public/js/all-web.js
index 9712ff6..b3ab4ed 100644
--- a/public/js/all-web.js
+++ b/public/js/all-web.js
@@ -139,8 +139,7 @@
 wn.route=function(){if(wn.re_route[window.location.hash]){var re_route_val=wn.get_route_str(wn.re_route[window.location.hash]);var cur_route_val=wn.get_route_str(wn._cur_route);if(decodeURIComponent(re_route_val)===decodeURIComponent(cur_route_val)){window.history.back();return;}else{window.location.hash=wn.re_route[window.location.hash];}}
 wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
 wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;case"Report2":wn.views.reportview2.show();break;default:wn.views.pageview.show(route[0]);}}
-wn.get_route=function(route){if(!wn.boot){return[window.page_name];}
-return $.map(wn.get_route_str(route).split('/'),function(r){return decodeURIComponent(r);});}
+wn.get_route=function(route){return $.map(wn.get_route_str(route).split('/'),function(r){return decodeURIComponent(r);});}
 wn.get_route_str=function(route){if(!route)
 route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return route;}
 wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();}
diff --git a/public/js/product_category.js b/public/js/product_category.js
index aac872f..da50d78 100644
--- a/public/js/product_category.js
+++ b/public/js/product_category.js
@@ -3,5 +3,8 @@
  *	erpnext/website/js/product_category.js
  */
 erpnext.make_product_categories=function(wrapper){wrapper.category_list=new wn.ui.Listing({parent:$(wrapper).find('.more-categories').get(0),query:'select count(name) as items, item_group \
-   from tabItem where is_sales_item="Yes" \
-   group by item_group order by items desc',hide_refresh:true,render_row:function(parent,data){parent.innerHTML=repl('<a href="#!products/%(item_group)s">%(item_group)s</a> (%(items)s)',data);}});wrapper.category_list.run();}
\ No newline at end of file
+   from tabItem \
+   where is_sales_item="Yes" and \
+   ifnull(show_in_website, "No")="Yes" and \
+   docstatus = 0 \
+   group by item_group order by items desc',hide_refresh:true,render_row:function(parent,data){parent.innerHTML=repl('<a href="#!products/%(item_group)s">%(item_group)s</a> (%(items)s)',data);}});wrapper.category_list.run();console.log('product categories made');}
\ No newline at end of file
diff --git a/public/web.py b/public/web.py
index 6f3569e..e70b61c 100755
--- a/public/web.py
+++ b/public/web.py
@@ -48,13 +48,26 @@
 	page_name = scrub_page_name(page_name)
 	
 	if page_name == '404':
-		comments = """error: %s""" % webnotes.getTraceback()
-		template = '404.html'
+		traceback = webnotes.getTraceback()
+		
+		# script is used to display traceback in error console
+		args = {
+			'comments': """error: %s""" % traceback,
+			'template': '404.html',
+		}
+		# 	'script': """(function() {
+		# 		var error = "ERROR: %s";
+		# 		console.log(error);
+		# 	})();""" % traceback.replace('"', '\\"').replace('\n', ' \\\n'),
+		# }
+				
 	else:
-		comments = """page: %s""" % page_name
-		template = 'page.html'
+		args = {
+			'comments': """page: %s""" % page_name,
+			'template': 'page.html',
+		}
 	
-	html = website.web_cache.load_from_web_cache(page_name, comments, template)
+	html = website.web_cache.load_from_web_cache(page_name, **args)
 	
 	return html