Add get_flatpages function to flatpage context