Create a view helper method `link_path_for(@page, @block, layer)`, which returns the path. Or, since you use view object, create the helper method in there.