The official documentation is at: http://docs.alfresco.com
Labs 3Web Studio3.0
NOTE: Web Studio is no longer part of the Alfresco Community build. The Surf framework that Web Studio utilised has been committed to Spring Source http://www.springsource.org/extension.../se-surf. Spring Surf is the underlying framework used by Alfresco Share.
The Web Editor Framework is the recommended platform for developing rich in-context WCM capabilities.
In this tutorial, we will focus on describing very detailed concepts. The tutorial will build on the earlier Web Studio Quick Start Tutorial and Web Studio Simple Site Tutorial. It will walk you through
- Creating a new blank site
- Creating pages
- Creating templates using the Template Designers,
- Creating Page, Template, Site, and Global scoped regions on the page templates.
- Upload new content
- How to bind and configure various components to template regions
To get started, access Web Studio using the following URL:
Log in to Alfresco Web Studio
Since you are not yet authenticated to Web Studio, you will be prompted to log in.
You can log in using your Alfresco credentials. However, for this walkthrough, log in using the following credentials:
Login Name: admin
Creating a new Blank Web Site
The next step of the wizard offers the option create a new web site or import an existing web site from Alfresco Network or from any web template repository your administrator has set up for you.
In this section, you will create a web site from scratch.
- In the Based on the following list, select Blank Web Site.
- Specify the name for your new site and click Create. Web Studio notifies you that it is creating your web site. Once this completes, it refreshes the cache and and displays the following:
This message indicates that your new site doesnâ€™t know how to render itself. In the next section, you will change that.
Associate a Presentation Template
For the new site home page to display, you must specify what kind of presentation template to use.
Web Studio allows you to have many presentation templates for a single page. The default format(default) corresponds to HTML output. However, you may also be interested in other formats such as:
In fact, we could have as many different â€œformatsâ€ as we would like for this page.
Thinking this way, we might reason that our home page could have a default HTML format for browsers. It might also have alternative formats for various types of consumer devices.
Letâ€™s keep it simple for now. Letâ€™s just try to set up a default template.
Click on Associate a Presentation Template to bring up the list of the presentation templates in use by this page. They will be listed and sorted by Format. There will be a single presentation template listed for each format.
Note that in this case, there are no template associations listed. We havenâ€™t defined any yet!
Click on Associate a Template. This will bring up a form with which you can establish this pageâ€™s presentation for various formats.
Under the Formats selector, you will be able to pick from the default out-of-the-box formats. These are Default, Print and Wireless (WAP). You can, of course, add additional ones if you would like. This is done through configuration but is not covered in this tutorial.
Click on Default to set up the template for the default (HTML) format.
Under the Templates selector, you will be able to pick which presentation template to use. There are several which are included with Web Studio but you are also free to create your own. A graphical editor is provided with Web Studio to help you do this and you can also build your own using Freemarker (FTL).
The default templates include:
Basic Home Page â€“ a simple home page layout with regions for header, navigation, body content (left, center and right) as well as a footer.
Basic Landing Page â€“ a simple landing page layout with region sfor header, navigation body content (left and right) as well as a footer.
In this case, since weâ€™re putting together a â€œHomeâ€ page, weâ€™ll just use the basic home page template.
Click on Basic â€“ Landing Template to set up the association to the prebuilt template.
Finally, at the bottom of the form, click on the Save button.
The template associations panel will now reflect the update.
Click on the X in the upper right of the form to close it.
Refresh the page to see your pageâ€™s new presentation!
Accessing the In-Context Editor
At the bottom-left of the page, you will see a â€œfloating menuâ€. This is a small menu that floats over your web page and makes available the in-context editor when you click on it.
Click on the floating menu.
When you do so, the in-context editor will spring into place.
Notice that your page slides over to the right, giving you full access to work with it. The in-context editor provides tools that you can use as you work with your page.
Along the top, you will see the in-context editor applications menu.
The applications panel reveals several sliders. You can expand each slider by simply clicking the button in each of the slider title bars.
The following sliders are available:
Navigation: Set up your site map, site navigation and pages
Templates: Set up presentation templates
Web Components: Add presentation components to your pages
Web Content: Add content from your Alfresco Repository to your pages
Sites: Add content from Alfresco Share sites to your pages
A Note on Regions
Your web page is rather bland at this point. It renders a template that contains a number of regions. But each region is â€œemptyâ€.
Web Studio informs you of these empty regions. Here is an example:
Adding Content and Assets to your site
With Web Studio, we are able to drag â€œthingsâ€ from the sliders into our web pageâ€™s regions. For instance, if we drag a piece of content into a region, we create a relationship between that piece of content and that region on the page.
In fact, Web Studio handles a lot Surf wiring for us. Web Studio instantiates new component instances, configures the component instances to reference the content we are dragging and then associates the component instance to the region on the page.
In short, Web Studio automatically creates Alfresco Surf component bindings for us!
We can drag the following kinds of things into the page:
Files that are stored in our web application
Folders that are part of our web application
Documents from our Alfresco Spaces Repository
Spaces from our Alfresco Spaces Repository
Custom objects from our Alfresco Spaces Repository
Content of various types from our Alfresco Share site
Document Library files
These are dragged into a page region to establish component instances on the page. You can think of a component instance like a gadget or a portlet. You might use this to drop in any of the following:
An image display gadget which renders a company logo.
An article list that shows the top headlines of the day.
A thumbnail browser of popular video content.
A breadcrumb trail
A dynamic navigation selector
You can imagine many more situations.
Bind in a Header Component
Bring up the in-context editor and expand the Web Content slider.
The Web Content slider provides you with full access to your web application content.
When youâ€™re using Web Studio, all of your web application content actually resides inside of a web project in Alfresco WCM.
In fact, weâ€™re looking at the current userâ€™s sandbox.
Also, notice how the regions have responded. The regions become â€œactiveâ€ meaning that you can drop things onto them. Hovering your mouse over a region will cause the region to transition in color, suggesting that you can drop things onto the region.
Now select the â€œheader.jpgâ€ file from Web Site -> images - home.
Drag the file from the slider onto the region named â€œheaderâ€
This region is in the global scope and is therefore colored pink.
The Alfresco Green Energy header image will now snap into place.
Congratulations â€“ youâ€™ve just bound a component into the page.
By dragging an image into the page, youâ€™ve created an Image Component binding.
Set up the Home Page
You should now be able to assemble the rest of the page by utilizing the rest of the image files from the Web Site -> images -> home location.
The final result should look like this: