Add first, last and permalinks to dynamic.php.
Un-hardcode the file name in dynamic.php.