localp={}--[[simpletitleThis function returns the current page title without the homonymy part (the part in parenthesis).Usage:{{#invoke:Titre sans précision|simpletitle}}OR{{#invoke:Titre sans précision|simpletitle|string}}Parameters string: if present this function will treat this string as the title of the page and remove homonymy part if present in it. If not given the function uses the page title (without namespace)]]functionp.simpletitle(frame)-- si un paramètre est indiqué, on l'utilise comme titre à traiter-- sinon on utilise le titre de la page actuellelocalpage=frame.args[1]if(page==nilorpage=='')thenpage=mw.title.getCurrentTitle().textend-- rappel : faire attention, gsub() retourne une 2e valeur (le nombre de remplacements)-- on enlève la partie entre parenthèseslocalnpage=page:gsub(' %(.+%)$','')returnnpageendreturnp