updated permalink nav logic