In this tutorial you will learn how to adapt the MX Kollection 3 elements to better fit your existing design and style. All this is done by using the fact that most of the HTML elements inserted by the MX Kollection 3 wizards and server behaviors use CSS files.
Besides choosing from one of the skins provided, you can also create a skin that integrates with your existing site smoothly, in a simple manner.
The application used in this tutorial is the web-site of a small company, that uses for the design an existing template, and for the dynamic elements MX Kollection3 Bundle.
The modules needed to complete this tutorial are:
For the basic operations requested in order to create a new skin, basic knowledge of graphic editing is required, while for more advanced changes, you will need some knowledge of CSS.
In this tutorial, you will customize an application that has been already created, that contains three
pages:
- A NeXTensio List used to display the company products
- A NeXTensio Form used in conjuncture with the list, to allow editing of elements
- A Contact Form, that allows users send their messages through e-mail to the company.
The application uses a template design, and all that has to be changed are the list, form and contact form appearance, through the CSS files.
The tutorial wil not present how to create the NeXTensio list or form, or the contact form. These elements can be found in one of the other tutorials (for the NeXTensio list and form, see the Job site tutorial > Improve the Job Site > Receive job ads by e-mail ; to learn how to create the contact form that sends the e-mail message, see the How to Send Form Contents by E-mail (without using a database) tutorial. ).
The pages look as follows in the browser (no customization yet):
- The NeXTensio product list
- The NeXTensio form for one element
- The contact form
Planning the application
This first section of this tutorial helps you create all the files and database tables needed for the application.
Before you start building this application, make sure you have a correctly configured Dreamweaver site, and a working database connection. For more instructions regarding such actions, consult the Getting started help file, which can be found in Help -> InterAKT -> Getting Started.
Through the tutorial, you will have to create several files in your site’s root. The file structure will look as in the example below, and you can create it easily by unpacking the zip file corresponding to your server model from \tutorials\Custom CSS Skin\ in your site root.
Besides these files that are the actual pages that will be viewed from the browser, some more files and folders will appear in your site structure:
- Some images, that come with the site template
- The Dreamweaver created Connection folder
- The includes folder, created when an extension is used on a page.
Included in the zip file you can also find the template that has been used in the tutorial, as well as the new skin’s images and CSS files.
After having dealt with the file and folder structure, it is time to create the database structure that will be used throughout the site’s pages. The database is simple in nature, as it is not the scope of this tutorial, and contains only two tables:
- product_prd – the table that stores the company’s product list
- category_ctg – this table stores the different product categories.
The scripts already contains some data, in order for you to easily view the results.
Next, open the main index page and create a new connection named connAds and configure it to connect to your newly created database.
Create elements needed for the customization
The NeXTensio list and form, as well as the contact form will replace the section containing text in the image above. However, none of the existing skins match the selected design. None of the skins use green for buttons or backgrounds.
The finished application must display links as buttons, and the button styles must match the general design: to use some green on the background.
The easiest way to start when creating a new skin is to start from an existing one, and modify its elements to integrate it into the design, as shown in the User Manual. The skin used as a basis for this tutorial is the Aqua skin.
The first step to take before starting any work is to identify the elements you need changed. To accomplish this, open the pages in the browser, and decide which elements must be changed for each of them:
- For the NeXTensio List: all buttons on the page: the buttons that replace the edit and delete links, the top and bottom rows buttons for adding a record, editing and deleting multiple records, and the navigation buttons.
- For the NeXTensio Form:all available buttons.
- For the Contact Form: only the submit button for the form must be changed, to match the rest of the site.
The main focus will be on the buttons. These must be created as images with a photo editing software (Fireworks, Adobe Photoshop, etc), based on the site color scheme.
To find out how many and what size the new images must be, open the includes/skins/aqua/images folder. In this folder, all images used for the skin are stored: buttons, backgrounds, widget and error elements. The files that pose the most interest at this point are:
- button_big.gif – it is displayed as the buttons on the top and bottom row
- button_small.gif – which is not used in the current skin
- button_smallest.gif – used for all other buttons on the list, form and contact
form.
In order to see exactly which files are used by the skin and in which manner, simply note down the styles used by the different elements as shown by Dreamweaver, and then open the nxt.css file – for the NeXTensio list and form, and the tng.css file – for the contact form. Locate the style classes noted earlier, and check the files that are used.
For example, the Add new link on the NeXTensio bottom and top row uses the KT_bottombuttons
class. This class is defined in the nxt.css file.
As you can notice from the code above, when viewed as buttons, the image used is images/button_big.gif. The path is relative to the CSS file, therefore the actual folder is the one specified earlier. Another important element supplied by the CSS code is the size of the image to use. In this case, the image to use for the button must have a width of 110 pixels, and a height of 20 pixels.
Do the same for the other buttons, to discover the file names and sizes
The edit and delete links shown next to each record in the NeXTensio list use the button_smallest file, with the following size: width: 50 pixels and height 20 pixels.
Once the required elements for the customization are identified, you can start creating them. If using the template provided with the tutorial, the button replacement images are also provided in the zip package.
Once the new images for the buttons are created, you can start creating the actual skin, and applying
it onto your site.
Will continue on the next post. “Tutorial | Create the new skin”.