Fixed broken sidebar_path function

Fixed broken sidebar_path function which caused a Fatal error when showing a page with sidebar