How to Update Your Homepage in Zesty.io

This article will guide you through the process of updating your homepage in Zesty.io, specifically when you're moving to a new content item for your homepage, which will point to a new URL path.

Understanding the Process

Updating your homepage involves several steps to ensure a smooth transition and that your new content is correctly displayed. This typically includes creating new content, configuring the new URL path, and then making the switch.

Step 1: Create Your New Homepage Content Model and Content Item

Before you can update your homepage, you need to have the new content ready. This involves creating a new content model (if new fields need to be added) and a new content item that will serve as your new homepage.

Creating a New Content Model (if needed)

If your new homepage requires a different structure than your current one, you'll need to create a new content model.

  1. Navigate to the "Schema" section in your Zesty.io instance.
  2. Click on "Create Model".
  3. Define the fields for your new homepage content model (e.g., title, hero image, body text, call to action).
  4. Save your new content model.

Creating a New Content Item for the Homepage

Once your content model is ready, you can create the actual content item for your new homepage.

  1. Go to the "Content" section and select your newly created or existing content model of your new homepage.

  2. Add or fill in all the necessary content of your new homepage.

  3. Go to the "SEO" tab. Set a unique slug and URL path for this new content item. For example, you might temporarily set it to /new-homepage during development.

    Make sure to also update the meta tags such as the title, description, and keywords of your new homepage.

    📘

    Note: Any change(s) you save in the SEO section goes live immediately.

  4. Save your edits.

  5. Go to the “Code” section and make the necessary updates to the code file(s) of your new homepage content item.

    📘

    Note: Only publish your new content item and its related code file(s) when your edits are ready, and when the below changes are ready to go live.

Step 2: Configure the URL Path via API Patch-Item Endpoint

To change which content item serves as your site's homepage (/), you must use the Zesty.io API PATCH item endpoint to swap the unique pathPart identifier: zesty_home.

Prerequisites

Before starting, ensure you have the following information:

  1. Instance ZUID: Your instance's unique identifier.
  2. Model ZUID: The unique identifier of the Content Model of both the old and the new content model (e.g., 6-xxx-xxx).
  3. Content Item ZUID: The item’s unique identifier of both the old and the new homepage content item. (e.g., 7-xxx-xxx)

Step 1: Deactivate the Old Homepage

You must remove the zesty_home pathPart from the existing homepage item to prevent a conflict when assigning it to the new one.

  • Action: Send a PATCH item request to the Old Homepage Item ZUID.
  • Request Body: Use a temporary value like "zesty_home_old".

Step 2: Identify and Prepare the New Homepage

Confirm the Item ZUID of the content item that will become the new homepage.

Step 3: Activate the New Homepage

Assign the crucial zesty_home pathPart to your new content item. This makes it the authoritative homepage for your instance.

  • Action: Send a PATCH item request to the New Homepage Item ZUID.
  • Request Body: Assign the value "zesty_home".

API Endpoint Format (Used for Steps 1 & 3)

The structure of the endpoint you will send both PATCH requests to is:

https://8-InstanceZUID.api.zesty.io/v1/content/models/6-ModelZUID/items/7-ItemZUID

Make sure your API requests include your appropriate Zesty.io authentication token in the request header.

📘

Note: Any changes to the url go live immediately and don't require a publish action.

Homepage Navigation Icon Identifier

Implementing below updates will make your homepage content more intuitive and less ambiguous.

  • Reordering of the Content Navigation Tree: When a new homepage content item is created, the order in the navigation tree normally falls at the bottom. Users can easily drag and drop content items to reposition them within the navigation structure. It is recommended to update the order of your new homepage content item to be on top ensuring a logical flow for visitors.
  • "Home" Icon Identifier: Updating the "Navigation Link" field value to “homepage” will display a distinct "home" icon. This visual cue will immediately communicate to users that the content item is a homepage, making it easier to identify and manage critical elements of your site's front page.

Verifying Your Changes

After making these updates, it's crucial to verify that your new homepage is displaying correctly.

  1. Open your website in a web browser and navigate to your homepage URL.
  2. Clear your browser cache if you don't see the changes immediately.
  3. Check all links and functionalities on the new homepage to ensure they are working as expected.

If you encounter any issues during this process, you may reach out to Zesty.io support for assistance.