Generating Web pages from page templates

Show Me

You can use page templates to create a new HTML, XHTML, JSP, or Faces JSP page. The new page can be created from sample page templates or page templates that you create yourself.

To create a Web page from a page template:

  1. In the Enterprise Explorer, right click on the folder in which you want to create the new file, and then select

    New | Web Page. The New Web Page wizard appears.

  2. Type the name of the file.

  3. Optionally change the folder name in the folder field, though if you do, ensure you choose a folder in or under the WebContent folder.

  4. Select a template from the list of templates. You can preview most of the templates in the preview box. If there are options associated with the template you have selected, the Options button will be available. For example, if you choose to create a page from the HTML template, you can specify coding, content type, document type, and other preferences in the Options window. Also note that option choices may vary based on the project facets that are associated with the project.

  5. Optionally select the Options button and specify the settings for the template you are choosing.

  6. Click Finish.

Important:: If you select a sample template, the template will be imported to your project unless you turn off the Link Page to Template check box. Also, the type of page template that will be imported depends on how you configure your project's facets. For example, if your project has "Dynamic Page Template Support (Struts Tiles)" installed, sample page template are installed as dynamic page templates. Otherwise, sample templates are installed as design-time page templates. If you want to select the type of template regardless of the project facets, do the following:

  1. Select a sample template

  2. Click the Options button. The Options page appears.

  3. Click

    Dynamic Template.

  4. Select the

    Convert Sample Template to Dynamic Page Template check box.

 

Related concepts

Page templates

Design-time page templates and dynamic page templates

Nested page templates

 

Related tasks

Creating a Web page template

Laying out a page template with tables

Applying or replacing page templates to Web pages

Applying a page template to a Web site

Adding content to a page template

Creating a nested page template