X-Git-Url: http://nitlanguage.org diff --git a/contrib/nitrpg/src/templates/templates_base.nit b/contrib/nitrpg/src/templates/templates_base.nit index a4f40d9..fe9efd8 100644 --- a/contrib/nitrpg/src/templates/templates_base.nit +++ b/contrib/nitrpg/src/templates/templates_base.nit @@ -21,8 +21,11 @@ import achievements redef class GameEntity + # Path to this entity from root. + fun path: String do return collection_name / key + # URL to this game entity page. - fun url: String do return game.url / key + fun url: String do return game.url / path end redef class Game @@ -32,7 +35,7 @@ redef class Game # This must be set before any access to `url`. var root_url: String is noinit, writable - redef fun url do return "{root_url}/games" / key + redef fun url do return "{root_url}/{path}" # Return a HTML link to this Game. fun link: String do return "{name}" @@ -45,13 +48,14 @@ end redef class Issue # Return a HTML link to this Issue. - fun link: String do return "#{number}" + fun link: String do return "#{number}" end redef class Achievement # Return a HTML link to this Issue. fun link: String do return "{name}" + # Render self as a media item. fun list_item: String do return """