Overview #
This document provides an administrator an overview on how to manage, create, delete and modify templates, allow for changes to the site and how things work on the site.
Data Transfer Objects (DTO’s), are common classes that will help get information from the database into the store. The CDTO Editor will allow ability to edit these classes and what information they retrieve from the catalog’s database.
The (Catalog Data Transfer Objects) CDTO Editor is a tool that allows the ability to edit the queries sent to the database through specific DTO. It also allows the ability to analyze which data is sent back so to use it accordingly in the template. This feature works in conjunction with the Template Editor.
CDTO Editor #
There are several options available in the CDTO Editor Page, for example, to create a new DTOs for the templates, modify existing ones, delete them, and even test them by sending a query to the server.
There are several ways to access this feature:
A. Through the Advanced tab:
- Click Advanced.
- Click CDTO Editor.
- Select the DTO to view/modify from the drop-down list.
- Click display.
B. Through the Template Manager:
- Click Templates.
- Click Manage Templates.
- Click on the Edit link for a specific template.
- Go to the DTO section and select the specific DTO.
- Click on the Edit link. You will be redirected to a page similar to the one shown in Figure 1.
Viewing and Testing DTOs #
- Access the CDTO Editor. Refer the CDTO Editor section for more details.
- Choose one of the DTOs in the drop-down list.
- Click Display.The query that is sent to database through the DTO can be seen.
- Click test to test the DTO.
- Type in an item ID number in the Required HQL parameters to test how the DTO works on the database.
- Click on Execute Query to see the results.
Creating New DTOs #
In order to create a DTO it is important to know about database tables.
- Access the CDTO Editor. Refer the CDTO Editor section for more details.
- Click New button at the top right of the page. A blank DTO page will show.
- Enter the details (Refer table 1).
- Click Ok or Apply button to create the DTO.
- You can also test the DTO. Refer the testing section for more details.
Field | Description |
Name | The name for the DTO that will be used in the templates. |
Caching | Select if actions performed by this DTO are to be stored in the server’s cache. Leave this unchecked if unsure. |
Query | The query that the DTO will perform. It is written in Hybrid Query Language (HQL). |
Available Template | List of templates that use the DTO. Nothing can be typed here since it populates itself whenever templates are using the DTO. |
DTO Type | The category that best applies to the DTO query |
Products per page | The number of items that will be shown in a template page when this DTO is used. This limits the rows of data that will be retrieved from the database. |
Page Links per Page | When a DTO returns many rows of data, this data can be divided into pages. This value defines how many page links will be shown on a page. This does not set into how many pages the data will be divided. For example, if the catalog displays 1000 items through the DTO, and this property is set to 5, this doesn’t mean the catalog will be divided into five pages showing 200 items each. |
Modifying Existing DTOs #
This allows the ability to modify any DTO that appears on the list.
- Access the CDTO Editor. Refer the CDTO Editor section for more details.
- elect the DTO to be modified.
- Click Display and change the settings to the required state
- Click Apply or OK to save the changes.x
Alternative Method: #
This is particularly useful if major changes have been done to the DTO’s function. This way allows the ability to track which templates will be directly affected by the changes and make the corrections as needed.
- Select a DTO which is being used in a template, the Available Template’s column will populate with the templates that use that particular DTO.
- Select the template to modify.
- Click Edit to edit the templates that use the selected DTO.
Deleting DTOs #
- Access the CDTO Editor. Refer the CDTO Editor section for more details.
- Select the DTO to be modified.
- Click Display.
- Once the DTO is shown, Click Delete button to delete the DTO.