Panel will not show fields from .txt file

Using this guide (https://getkirby.com/docs/cookbook/one-pager) I’ve been building a one page site, most everything works fine but the PANEL interface is not showing the fields I’ve put in the /content/1-products/home.txt no matter what I do. This is probably a newbie mistake but I’m stuck and can’t figure this one out.

I’ve:

  1. re-uploaded the /panel
  2. re-uploaded the /site
  3. set permissions to 755 on everything

The home.txt looks like this:

Title: Quality contact lenses
----
Text: We carry an extensive range of daily, fortnightly.
----
Subtitle: Premium lenses & coatings
----
Subtext: We use the full range of lens designs .
----

When I load the site it all loads and displays correctly, the <?= $data->subtitle()->html() ?> can see and load the content into the snippets I’ve built. however, none of the pages are loading the fields from the .txt into the Pages of the Panel Interface.

Any ideas?

Do you define the fields in your blueprint?

1 Like

Thank you! @klixx

I knew it was something simple, I was looking in the wrong place. Found the blueprints in /site/blueprints/ and most of it is working now. Having a bit of trouble with the Contact Page, it’s only showing half the fields I defined in the blueprints.

Thank you again!

Show us the blueprint and the template of your contact page.

Yaml is sensitive to indentation. Look for the last field that displays properly in the panel, and check the indentation in blueprint from that field downwards.

Here’s the blueprint I’m only using a few of the fields. I’m not usign anything below ‘contactoptions’ however, the panel stops loading at subtitle.

title: Contact

pages: false

options: 
  delete: false
  status: false

fields: 
  title:
    label: Title
    type: title

  maintitle:
    label: Main Title
    type: text

 subtitle:
    label: Subtitle
    type: text

  text:
    label: Text
    type: textarea

  hours:
    label: Hours
    type: textarea

  contactoptions:
    label: Contact Options
    type: structure
    style: table
    fields:
      title:
        label: Title
        type: text
      icon:
        label: Icon
        type: image
      text:
        label: Text
        type: text
      url:
        label: URL
        type: text
      linktext:
        label: Link Text
        type: text

Field names should be unique. You have some in the structure field with identical names to others further up.

In structure fields you can in fact use the same field names as outside the structure

Looks like your indentation is not correct

I went over each line and found a missing space. This YML is touchy! Thank you for the tips. I REALLY like Kirby.

Yes, YAML uses a fixed indentation scheme for each data layer. If you stick with two spaces for each indent, you are safe.

1 Like