Creating a New Page - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

To create a new page in Share using the new capabilities added by recent updates you can now do the following:

Create a new web script (made up of the following files):

  • new-page.get.desc.xml (web script descriptor)
  • new-page.get.js (web script controller)
  • new-page.get.html.ftl (web script template)

Place these files in any path under <tomcat-home>/webapps/share/WEB-INF/classes/alfresco/site-webscript.

Add the following content to the web descriptor:

<webscript>
   <shortname>My New Page</shortname>
   <url>/my-new-page</url>
</webscript>

Add the following content to the JavaScript controller:

model.jsonModel = {
   widgets: [{
      name: "alfresco/logo/Logo"
   }]
};

Add the following content to the template file:

<@processJsonModelgroup="share"/>

In your web browser navigate to: http://<server>:<port>/share/page/dp/ws/my-new-page and you will see the Alfresco logo displayed on the page.