Commit 40cf36bd authored by Guillaume Porte's avatar Guillaume Porte 😶
Browse files

ajout d'une fonction pour passer un map() de données custom pour le template...

ajout d'une fonction pour passer un map() de données custom pour le template HTML + correction du commentaire pour "getProjectDefaultLang"
parent ec8d8692
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -43,7 +43,16 @@ declare function max.config:getProjectPrettyName($projectId){
};


(:returns edition prettyName from config file:)
(: 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)}
  )  
};

(:returns edition default lang from config file:)
declare function max.config:getProjectDefaultLang($projectId){
    let $lang := doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$projectId]/@lang
    return