Adds behavior to directory template