Create new custom table country names in kentico

Here are the steps to create a new custom table with country names in Kentico:

Step 1: Create a new table

  1. Log in to your Kentico instance and go to the "Development" section.
  2. Click on "Tables" and then click on "Create new table".
  3. Fill in the required information:
    • Table name: e.g. "Country"
    • Table description: e.g. "List of countries"
    • Table type: "Custom table"
  4. Click "Create" to create the new table.

Step 2: Add columns to the table

  1. In the "Table" section, click on the "Columns" tab.
  2. Click on "Add column" and add the following columns:
    • Column name: "CountryID" (unique identifier for each country)
    • Data type: "Integer"
    • Column name: "CountryName" (name of the country)
    • Data type: "String"
    • Column name: "CountryCode" (ISO 3166-1 alpha-2 code for the country)
    • Data type: "String"
  3. Click "Save" to save the changes.

Step 3: Add data to the table

  1. In the "Table" section, click on the "Data" tab.
  2. Click on "Add new record" and add the following data:
    • CountryID: 1
    • CountryName: "United States"
    • CountryCode: "US"
  3. Repeat the process to add more countries to the table.

Step 4: Create a new module

  1. In the "Development" section, click on "Modules" and then click on "Create new module".
  2. Fill in the required information:
    • Module name: e.g. "Country"
    • Module description: e.g. "Country module"
  3. Click "Create" to create the new module.

Step 5: Add a new web part to the module

  1. In the "Modules" section, click on the "Web parts" tab.
  2. Click on "Add new web part" and select "Custom web part".
  3. Fill in the required information:
    • Web part name: e.g. "Country list"
    • Web part description: e.g. "List of countries"
  4. Click "Create" to create the new web part.

Step 6: Configure the web part

  1. In the "Web parts" section, click on the "Configure" tab.
  2. In the "Data source" section, select "Country" as the table.
  3. In the "Columns" section, select "CountryName" and "CountryCode" as the columns to display.
  4. Click "Save" to save the changes.

Step 7: Add the web part to a page

  1. Go to the "Pages" section and select a page where you want to add the web part.
  2. Click on "Add web part" and select the "Country list" web part.
  3. Configure the web part as needed (e.g. set the layout, add a title, etc.).
  4. Click "Save" to save the changes.

That's it! You have now created a new custom table with country names in Kentico and added a web part to display the list of countries.