Commit be931272 authored by Guillaume Porte's avatar Guillaume Porte 😶
Browse files

Ajout d'une fonction max.config:getProjectLangParam qui vérifie si un...

Ajout d'une fonction max.config:getProjectLangParam qui vérifie si un paramètre @showLang="true" est présent dans le fichier de conf d'une édition (dans l'élement <edition>). Cette fonction est ensuite appelée dans html.xqm pour ajouter ou non le préfixe de la langue dans l'URL
parent 7460ca8b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -247,3 +247,12 @@ declare function max.config:getProjectData($project){
      return map:entry($data/@key , data($data))
  )  
};

(:returns params for language in URL:)
declare function max.config:getProjectLangParam($projectId){
  let $showLang := doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$projectId]/@showLang
  return 
    if($showLang = "true")
    then string($showLang)
    else string("false")
};