|
|
|
|
|
- Overview
- Creating a page template
- Creating a page template
- Creating a page template from an existing page
- Applying a page template
- Creating a new page that uses a page template
- Applying a template to an existing page
- Opening the template associated with a page
- Applying the modifications performed on a template
- Testing a page template
- List of templates used
WEBDEV allows you to create page templates. These templates contain all the graphic elements common to all the pages of your site. The changes made to the page template are automatically applied to all the pages that use this template. A page template allows you to use the style book defined for a site. It is recommended to use templates in your WEBDEV websites rather than framesets. Using page templates in your sites allows you to: - optimize the speed when displaying the pages of the site.
- limit the number of generated HTML files (and therefore the number of HTML files downloaded to the computer of the Web user).
- easily create the site pages.
- define the layout of the site pages.
- easily update the site style book.
- simplify the management of targets for the site pages.
- ...
A page template can be created: - directly, like any other page.
- from an existing page.
Creating a page template To create a page template: - Create a new page template:
- Click in the quick access buttons.
- The window for creating a new element appears: click on "Page", then on "Page templates".
- Specify (if necessary) whether the page template must:
- be blank,
- be based on one of the project templates,
- use a preset template.
- Create all the necessary controls. These controls will be included in all the pages that use the page template.
- Enter (if necessary):
- the WLanguage events / processes associated with the page template.
- the WLanguage events / processes associated with the different controls of the page template.
These events and processes will be automatically imported into the pages that use the template.
- Give your template a name ("General" tab of the description window).
- On the "Home" tab, in the "General" group, click "Save" (or click in the quick access buttons).
The page template corresponds to a file whose extension is ".WWT".
Creating a page template from an existing page To create a page template from an existing page: - Open the page chosen as template.
- Keep the controls required by the template. These controls will be included in all the pages that use the page template.
- Keep the code of processes required by the template. These processes will be automatically imported into the pages that use the template.
- Give your page a name ("General" tab of the page description window).
- On the "Home" tab, in the "General" group, expand "Save" and select "Save as template". The current page becomes a template:
- its name is preceded by "Template".
- a yellow border appears around the page in the page editor.
- the page template appears in the "Project explorer" pane, in the "Page templates" section.
- the extension of the template file is ".WWT".
Creating a new page that uses a page template To create a new page that uses a page template: - Create a new page:
- Click in the quick access buttons.
- In the window that is displayed, click "Page" then "Page".
- In the wizard, select "Page" on the left and select your custom template on the right.
- Validate the creation of the page. A blank page associated with your page template is created.
A yellow square is used to identify the elements belonging to the page template. These elements can be modified: - in the page template: the modification will be effective for all pages using this template.
- in the page, using the "field override" mechanism: the modification will be effective only for the page.
Applying a template to an existing page To apply a template to an existing page: - Display the page in the page editor.
- On the "Page" tab, in the "Description" group, expand "Templates" and select "Inherit from a template".
- Select the page template to apply.
- Validate.
- Specify whether you want to refresh the page properties from the template. If you answer Yes, the page will be automatically linked to the template for most of its characteristics.
Remark: the properties of the page managed by the template are as follows: Image, Fixed background image, Background color, Text color, Link color, Visited link color, Active link color, Underline link, Center page, Set fields on page, Title, Display gauge field, Ajax indicator position. Opening the template associated with a page To open the template associated with a page: - Display the page in the page editor.
- In the context menu of a template element, select "Open template".
Other possibility: - List the templates associated with the page: under the "Page" pane, in the "Description" group, scroll down to "Templates" and select "List used templates"..
- Select the desired template and click "Open template" ().
Applying the modifications performed on a template When a page template is modified, the modifications can be applied to one ore more pages that use this template in the current project. Applying the modifications is proposed when closing the template (if the modifications have not been saved). This operation can be performed at any time: - from the template: in the "Page" pane, in the "Description" group, scroll down to "Templates" and select "Update associated pages".
- from any page that uses the template:
- by opening the list of models used: in the "Page" pane, in the "Description" group, scroll down to "Templates" and select "List of models used"..
- then by clicking the "Update" button.
- from the page template, via the icon in the template bar.
Remark: Modifications to the template are carried over according to the features overridden in the pages using the template. To test a page template: - Open the template to be tested:
- On the "Page" tab, in the "Description" group, expand "Templates" and select "List of templates used",
- Click "Open template".
- Click in the quick access buttons.
To view the list of templates used in a page, go to the "Page" tab, "Description" group, expand "Templates" and select "List of templates used". From this window, you can: - "Open template": opens the selected template in the page editor.
- "Update": fields and template code are updated in the page.
- "Add": adds a template to the current page.
- "Disassociate": template fields on the page are disassociated from the template.. The template is deleted from the list of templates used but its controls are not deleted from the page.
- "Delete": deletes the template (fields and code) from the page.
Related Examples:
|
Training (WEBDEV): WW_Wizard
[ + ] WEBDEV allows you to create your own Web wizards, via the WLanguage PageDisplayDialog function that is used to display a page in a modal way. This allows you to establish a dialog with the user. To go from a wizard plane to another one, all you have to do is use the concept of plane found in WEBDEV.
|
|
Complete examples (WEBDEV): WW_Rewali
[ + ] This example is a site for travel booking. It proposes travels at very attractive prices. You have the ability to choose the travel duration, the start dates, then validate the purchase until the payment via Paypal. It is using the "scrolling banner" control and the planes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|