Replace sidebar template call with path function