Commit 0df38a5f authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Merge branch 'gp/projectData2' into 'master'

Proposition pour l'ajout d'une fonctionnalité pour passer des informations custom au template HTML

See merge request pdn-certic/MaX!96
parents a6735a33 f38985cd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -240,3 +240,11 @@ declare function max.config:getProjectAuthor($project){
    doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]/author/text()
};

(: get project data from config file :)
declare function max.config:getProjectData($project){
  map:merge(
      for $data in doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]/projectData/data
      return
        map{$data/@key : data($data)}
  )  
};
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ declare function max.html:render(
                    map {
                    'projectId' : $projectId,
                    'prettyName' : max.config:getProjectPrettyName($projectId),
                    'data' : max.config:getProjectData($projectId),
                    'baseURI' : max.util:getRelativeRootPath($projectId),
                    'home' :  max.util:getRelativeRootPath($projectId) || 'accueil.html',
                    'menu' : $menu,