Unicorn Platform Prompt to pull Google CSV Listings

Hey everyone,

After lots of testing of different tools, I think I’ve settled on Unicorn platform. While I’m giving up a bit of control of a custom site where anything is possible, this platform seems to scale programmatic pages really well.

The issue I had was that listings blocks were not pulling from my google sheet properly if the headers I was replacing didn’t match 1:1 with the template so after a lot of back and forth, I finally got claude to get it to work and so I just asked it to recap what we did and give me a prompt for the future.

Hopefully this saves you some time as this was pretty tricky as a non coder.

now to figure out the rest of the platform..

Here’s the prompt:

[prompt start]
# Guide to Customizing Directory Listing Blocks in Unicorn Platform

## Understanding Unicorn Platform's Architecture

Unicorn Platform is a no-code/low-code website builder that utilizes a block-based approach for creating websites. Each block (like the directory listing block we worked with) has its own configuration settings and customization options.

The platform organizes customization into several tabs:

1. Data Source Tab: Where you connect external data (like Google Sheets CSVs)

2. Content Tab: For configuring what content appears in the block

3. Style Tab: For visual styling (colors, spacing, etc.)

4. Code Tab: For custom HTML/CSS/JS modifications, further divided into:

- CSS: Custom stylesheet rules

- JS: JavaScript functionality

- Search & Filters: Template code for search and filtering functionality

- Items: Template code for how each individual listing item appears

## Working with CSV Data in Unicorn Platform

When customizing directory listings that pull from a CSV:

1. The platform reads headers from your CSV file

2. You can reference these headers in your template using double curly braces: `{{headerName}}`

3. Header names are case-sensitive and should match exactly (e.g., `{{imageurl}}` not `{{imageUrl}}`)

4. No need for triple braces like in some template engines

5. Conditional logic might not be fully supported or may need specific syntax unique to Unicorn Platform

## Template Code Structure for Directory Listings

Here's a template for modifying the "Items" tab in a directory listing block:

```html

<div class="directory-01__item">

<a target="{{dynamicTarget}}" href="{{website}}">

<!-- Bookmark/favorite heart icon -->

<div class="directory-01__bookmark">

<svg class="bookmark-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">

<g id="Interface / Heart_01">

<path id="Vector" d="M12 7.19431C10 2.49988 3 2.99988 3 8.99991C3 14.9999 12 20.0001 12 20.0001C12 20.0001 21 14.9999 21 8.99991C21 2.99988 14 2.49988 12 7.19431Z" stroke-linecap="round" stroke-linejoin="round"/>

</g>

</svg>

</div>

<!-- Thumbnail image -->

<div class="directory-01__top-box">

<img loading="lazy" class="directory-01__thumbnail" src="{{imageurl}}" alt="{{title}}"/>

</div>

<!-- Listing details -->

<div class="directory-01__bottom-box">

<!-- Title section -->

<div class="directory-01__title-box">

<div class="directory-01__title-text-container">

<h3 class="directory-01__title">{{title}}</h3>

</div>

</div>

<!-- Content section -->

<div class="directory-01__text content_box">

<p class="item-category">{{categoryName}}</p>

<p class="item-location">{{city}}, {{province}}</p>

<div class="rating-wrapper">

<span class="item-rating">{{totalScore}}</span>

<span class="reviews-count">({{reviewsCount}} reviews)</span>

</div>

<div class="hours-wrapper">

<p class="item-hours">{{openingHoursMonday}}</p>

<span class="hours-tag">/day</span>

</div>

</div>

</div>

</a>

</div>

```

## Best Practices for Modifying Directory Listings in Unicorn Platform

1. Start Simple: Begin with a minimal template and add features incrementally

2. Avoid Complex Logic: Minimize conditional statements and stick to direct variable insertions

3. Match CSV Headers Exactly: Use the exact casing and naming of your CSV headers in the template

4. Test Iteratively: Make small changes and test frequently to identify issues

5. Use Platform Classes: Leverage existing CSS classes (like `directory-01__thumbnail`) to maintain consistent styling

6. For Image URLs: Ensure the CSV column for images contains complete URLs (including https://)

7. Be Careful with Special Characters: If URLs have special characters, they might need special handling

## Debugging Common Issues

1. Template Text Showing in UI:

- Remove conditional logic (`{{#if}}` statements)

- Double-check syntax matches what Unicorn Platform expects

2. Images Not Loading:

- Verify the CSV column name matches exactly what's in your template

- Check that image URLs in the CSV are complete and valid

- Try using a simple image placeholder to test if the slot works correctly

3. Missing Content:

- Confirm the CSV column exists and has data

- Check for typos in the variable name

- Make sure the template structure includes the correct container for that content

## Example Customization Workflow

1. Identify which directory block needs customization

2. Review the CSV data to understand available headers

3. Navigate to the Code tab > Items subtab

4. Start with a minimal template showing just essentials (title, image)

5. Test to ensure the basics work

6. Incrementally add more fields from your CSV

7. Test after each addition until the listing appears as desired

By following these guidelines, you can effectively customize directory listing blocks in Unicorn Platform to display your CSV data in the desired format.

[end prompt]


This is where you paste the code output