Bonjour,

 

Comment créer une page à partir de l'api jahia (sans passer par l'interface) ?

Nous avons cette problématique pour accélérer la création d'un site qui devrait 
contenir 500 pages.

 

Le code suivant ne semble que créer partiellement la page (on la voit bien dans 
l'administration, dans la liste des pages, mais l'accès à la page génère une 
erreur et elle n'apparaît pas dans le sitemap) :

 

JahiaPageService service = 
ServicesRegistry.getInstance().getJahiaPageService();    

JahiaPageTemplateService serviceTemplate = 
ServicesRegistry.getInstance().getJahiaPageTemplateService();

JahiaPageDefinition templateDef = 
serviceTemplate.lookupPageTemplateByName(pageTemplateName,siteID);

JahiaPage page = service.createPage(siteID,parentID, 
org.jahia.services.pages.JahiaPage.TYPE_DIRECT,title,templateDef.getID(),null,-1,creator,parentAclID,jParam);
 

 

 

 

Merci de tout aide,

 

 



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

Répondre à