A web project contains all of the content and assets (files and images) required for the website(s). All actions for managing a specific website, creating content, uploading assets, reviewing and previewing content, workflows, managing web forms, managing rendering templates, and publishing are associated to a web project.
To create a new web project, go to the Company Home | Web Projects space, select the Create drop-down menu and click on the Create Web Project link as shown in the following screenshot:
You will see the Create Web Project Wizard, which includes seven steps in creating a web project as follows:
The Create Web Project Wizard is shown in the following screenshot for your reference:
Use some sample web project information to complete the step.
Name |
Unique name of your web project. This is used as unique ID for your web project. |
DNS name |
DNS name for deployment. Usually it is your website DNS entry such as Cignex.com. |
Default Webapp |
Your web project can have a web application folder name. By default it is called as ROOT in WCM. You can have more than one web application in your web project. The details of creating more web applications are given in Chapter 8,Managing Multiple Websites Using WCM. |
Title |
Title of your web project. |
Description |
Brief description of the web project. |
Use as a template? |
This web project can also be used as a template project to create many such web projects with the click of a button. |
Preview Provider |
By default Alfresco provides Virtualization Server Preview. You can customize it to have your own preview server. |
Click on Add Deployment Receiver to display the configuration details. Use the following information to complete the page. More information about the deployment receiver and the deployment process is explained in Chapter 7,Content Delivery and Deployment.
Type |
Live Server |
Host |
localhost |
Port |
44100 |
Username |
admin |
Password |
admin |
Web form is a very important functionality of WCM. We are going to skip this step as web forms are covered in detail in Chapter 4, Web Content Production with Web Forms. Click on the Next button to skip this step.
This step helps you to add and configure a new workflow for the web project. The workflow can also be associated with a web form (from the previous step).
Workflows are covered very extensively in this book in Chapters 5 and 6. Refer these chapters for understanding more about adding and configuring workflows. For this web project, do not select any workflow. Click on the Next button to skip this step.
This step allows you to select the content managers for this web project from the list of available users.
Using the search feature provided, locate and select the user. Select Content Manager as the role for this user and click on Add to List. You can add as many users as you want to a specific web project:
Review the summary screen and click on the Finish button once you are fine with the information provided in the summary.
You can always add or modify the web project details at any given point of time.
The new web project appears in the Web Projects space. Completing the wizard automatically creates a source repository called a Staging Sandbox, and a set of development repositories called User Sandboxes. There is one User Sandbox for each user invited to work on the project, as well as an administrator sandbox.
In this section we shall see how we can easily create a website with a web project. For this we will use an existing ROOT folder, and import it into the web projects folder. The details of creating a website from scratch are given in the subsequent chapters of the book.
The code bundle for the corresponding files is available as a downloadable for this chapter.
On clicking on the web project, the sandbox view appears displaying the Staging and User Sandboxes. Each User Sandbox contains the existing web project content. The sandbox labeled My Sandbox belongs to the currently logged in user (in this case, the administrator). As the administrator, you have access to the sandboxes of all users associated with the web project.
By default, only the Staging Sandbox and the User Sandbox display; however, you can select the Show All Sandboxes option in this view to display all the sandboxes available to you, as shown in the following screenshot:
Refresh your browser page to view all the User Sandboxes if the browser is not refreshed automatically.
You cannot add the content directly to the Staging Sandbox. Here is the process you need to follow in order to create the content.
There are multiple methods of adding and creating content for a web project. In addition to creating web content within a project, you can also upload individual files from your computer or perform a bulk import of a ZIP file with web project contents as shown in the following screenshot:
When you install WCM, you will also get sample files to create web projects. Refer to the file alfresco-sample-website.war
, which is provided as a default example in the Alfresco bundle, from c:alfrescoextraswcm
.
To bulk import content of this file, select Bulk Import in the Create menu. Use the Browse button to locate and upload the alfresco-sample-website.war
file. Once uploaded, click on OK to begin the import.
The .war
file, which you imported into the current directory (the ROOT webapp), appears in expanded form in your User Sandbox.
If you don't have the sample .war
file, then add few sample files to your User Sandbox from your local computer using the Add Content option. In the Alfresco WCM, a lock is automatically placed on content items created, imported, modified, or deleted, in order to prevent editing clashes. In our sandbox, notice that all of the items (not folders) currently display a padlock icon with a key(
) This indicates that you own the lock and can perform actions on the content. A lock owned by another user appears as a plain padlock(
) You can position the mouse cursor over the icon to display a tooltip indicating the lock owner.
Click on Preview Website in the sandbox header to see the website in its current state.
The preview window displays how the website or web application will look with the submitted User Sandbox content. Click on About us and then on News to display the empty Alfresco Press Releases page. You will come back to this again later once you have added some content.
Close the preview and return to User Sandbox. Click on Project Name in the breadcrumb path to return to the sandbox view.
At this point, the web project is populated with content items, some imported and some created, some submitted and some not. You must now deal with the submission of the remaining items to staging.
In the User Sandbox, expand the Modified Items list to display the imported content.
Click on Submit All and, on the Submit Items page, provide the information that will display as the name and description of the corresponding snapshot in staging:
Label:Initial Import
Description:Sample Website
Click on OK. The submission takes place in the background and each content item remains in the Modified Items list until its submission is complete.
Refresh the page as necessary until the Modified Items list is empty. In the Staging Sandbox, expand the Recent Snapshots list to view the snapshot you have created as shown in the following screenshot: