Hi Roger,

You can retrieve a page from a URL key with the following code :

ArrayList pageProperties = ServicesRegistry.getInstance().
getJahiaPageService().getPagePropertiesByValue(
lastPageURLKeys);
if (pageProperties.size() == 1) {
PageProperty pageProperty = (PageProperty) pageProperties.get(0);
if (pageProperty.getName().equals(PageProperty.PAGE_URL_KEY_PROPNAME)) {
// Yes, we have a match, let's marry !
contentPage = ContentPage.getPage(pageProperty.getPageID());
}
}


Of course you will also need to import the corresponding classes. Once you have the page ID you can use the getAbsoluteContainerList(String name, int pageID) method.

Regards,
 Serge Huber.

Roger Fraisse wrote:

Hello,

What is the method to get a field or a containerlist thanks to the URL key of the page ?
Is it possible to use absolute adressing with the URL key ?


Thanks !







  • URL Key Roger Fraisse
    • Serge Huber

Reply via email to