4W WebMerge Settings
Detail Pages Tab
The Detail Pages tab lets you assign a folder for the pages to be generated into, assign a template for your detail pages, and define how you want the generated detail pages to be named.
Assigning a Destination Folder
If you want to generate detail pages, check the box labeled "Create Detail Pages in" to activate the features in the Detail Pages tab. If you have not already assigned a folder in which to generate the pages, setting that checkbox will trigger to "Folder..." button next to it, which presents a dialog to let you select the target folder.
Assigning Templates for your Detail Pages
WebMerge provides three ways to assign templates for your detail pages, which can be selected by clicking the appropriate radio control:
- Auto-Create New Template
WebMerge creates a simple detail page template on the fly during generation, which shows each field name with the corresponding field data next to it.
- Use one template file for Detail Pages
WebMerge will make your detail pages from one template you prepare as an HTML document. You select your HTML detail template using the "File..." button to the right of this option.
- Use Template file specified in Field
If you need a different template file for each record, you can specify the path to that template in a field in your source file, and assign that field using the popup list to the right of this option. The path specified in field data can be either a full path, or relative to the destination folder.
Naming Generated Detail Pages
WebMerge provides two options for determining the names of your generated detail page. The names of generated files consist of a base name and an extension, and can either be based on the contents of a field or serialized.
You set the base name for your generated detail pages in the field labeled "Base name", and the file extension is set in the field labeled "Extension". By default WebMerge uses "record" as the base name and ".html" as the extension, but you can change these as needed for your setup.
As you change options in these controls, WebMerge updates an example name in the upper right of this group showing you what the name of the first generated file will look like.
The three main options for naming index pages are:
- Name based on contents of field
You can include a field in your database which contains the name of the detail file you want that record generated to. You specify that field using the popup list to the right of this option.
WebMerge will use the first 255 characters of data in the specified naming field, so be sure you choose a field which is not likely to contain duplicated data across records. If the same data appears in your specific naming field in more than one record, each page generated with that name will overwrite any previously generated ones with the same name.
WebMerge alters data used as file names to be suitable for use on a Web server. Characters such as quotes, spaces, question marks, forward slashes, and others have special significance on a server, and such characters are converted to hyphen ("-") when the page is generated.The data in this field can also specify sub-folders for generated HTML pages.
The data in this field can also specify sub-folders for generated HTML pages. If the field you specify for the file name contains a standard UNIX folder name (separated by "/") before the file name (e.g., "myfolder/filename") it will create the specified subfolder as it creates the file. These can even be several levels deep if you like, using something like this:
That data will generate a file named "page001.html" inside of a folder named "another folder", inside of a folder named "subfolder".
- Serialized names starting with #
If you do not have a field which defines their file names, WebMerge can create detail pages with serial numbers appended to them. You assign the starting number for the series in the field to the right of this option.
For details on creating your detail templates, see the section Preparing Your Templates.