Blueprint to show all Fields in my .txt files

Is there an easy way to get the Panel to show all the Fields I’ve made in my pages .txt files? So the panel automatically picks up the Fields I’ve already made in my content .txt files?
Preferably in the default Blueprint, so I don’t have to make any other Blueprints?

So for example:
Title:
Menu name:
Description meta tag:
Heading:
Sub-heading:
Text:
Quote:

It feels like I’m duplicating work. I’ve created my Fields and added my content into the .txt docs. And now I have to create Blueprints to allow me to use the Panel to edit my Fields and content.

Plus a way to include certain images on the page (but not all) and in a specific order, with captions showing?

Can I caption images in the Panel and make alt text? It would be neat if the same Blueprint allowed this

Theoretically, that would be possible, but doesn’t really make sense.

So I’m going to have to duplicate quite a bit of work – creating a Blueprint to get the Panel to display the Fields I’ve already made? I guess I had assumed the Panel would automatically display my content .txt documents and fields that I have already created.

I’ve read all the docs on Blueprints, but I’m afraid I didn’t understand a word of it. Any pointers on how I get the Panel to display my Fields and content?

Usually, when you use the Panel, you create the blueprints with all the fields you need first, then the content files are created automatically via the Panel.

The reason why you have to create the fields in the blueprint is because it gives you the option to create as many page types (blueprints with different layout, fields etc) as you need to structure your content.

If you start with the content first, you have some duplicate work to do, that’s true.

I already recommended you to have a look at the blueprints and the content files in the Starterkit, this will give you a good idea of how it all works. It’s impossible to repeat our complete documentation here in the forum.

You can also find example blueprints here:

The guide is here together with a video:

If that doesn’t help, please feel free to come back with specific questions.

I’ve read all the docs. I don’t understand a word of it. A specific question. How do I get the Panel to show the following fields?

Title:
Menu name:
Description meta tag:
Heading:
Sub-heading:
Text:
Quote:

At the moment it is just showing the Title and Text field

To be honest I can just about understand the Content and Templates, but the Blueprints is beyond me. I was hoping the Panel would just work – I didn’t realise I had to build it as well as the website.

Most simple without any columns

title: Blueprint title

fields:
  field1: # name of field
    type: text # type of field
  field2: # name of field
    type: textarea # type of field

Take the rules for field names into account: Fields | Kirby CMS

Do not add the title field, it’s special and will be read from the title field in your content automatically.

Thanks, so would it be something like this?

      field1: Menu_name # name of field
      type: text # type of field
      field2: Description_meta_tag # name of field
      type: text # type of field     
      field3: text # name of field
      type: textarea # type of field
1 Like

No, replace field1 etc. with your field name as in your content file. Please check out the examples, we have so many of them.

That also wouldn’t work in a good way. The Panel can’t know just by the content what field/input you would want to represent a field in the Panel. A text input? A textarea? Maybe actually a select dropdown?

Okay I’ve finally got my Fields to display in the Panel.

Next thing. On my case study pages I have a div container where my images are displayed. Normally this is all the images in the particular case study folder, but not always.

Is there a way in the panel, that I can choose which images I want to use and the order? And for each image to display its caption?

I’m kinda thinking a way to drag and drop my images on the right, into a panel on the left, in the order I want?

1 Like

I guess we’re both loosing the will to carry on with this!

			image_div: 
				type: files

Works, but how do I get my image captions to display wrapped within a p tag and a class of caption?

Okay in the Panel I now have the option to select files in a files select field called ‘image_content’.

How do I get the content to display in my browser? I’ve tried the following but the images do not display, just the file names.

<div class="image-content">
      <?= $page->image_content() ?>
</div>

I’ve now tried this, but no joy

<div class="image-content">
	<?php
	$images =  $page->gallery()->toFiles();
	foreach($images as $image): ?>
	  <img src="<?= $image->url() ?>" alt="">
	<?php endforeach ?>
</div>

I don’t know how to add a files select field (containing images) to a template

Doh. All I had to do was change the Field name from gallery to my Field name image_content and hey presto it works!

Still don’t know how to display each image caption

I would say that you are the only one who has never had the willingness to fill your gaps by reading docs carefully and adapt your coding style to the framework of a modern CMS like Kirby. To blame the support who has already put much time and effort into it is not appropriate.

Most of your posts in this forum (and I have read them all) could be answered by “RTFM - and try to understand”. E.g., if the doc says “… Kirby automatically parses…” I would not expect the need to turn something on or off, otherwise it wouldn’t be automatically. So please, slow down, invest some time to learn from the docs, the cookbook, the screencasts, the instant demo and the starterkit, all of them made with time consuming commitment and deliberation, and if there are still open questions afterwards, everyone here will enjoy to give a helping hand.

Hi. A fair comment.

I’m coming to Kirby as a complete novice in content management systems, PHP and web development in general. I really like the look of Kirby and the support on this Forum has been amazing. I have found the documentation to be hard – for me – to understand. This probably says more about me, than the documentation. But I do wonder if some of the docs are written assuming knowledge. Actually I wonder if I can help – if I spot something that I don’t understand I’d want to point this out, to see if we can improve the docs. If I can understand it, anyone can!

As you suggest, I’ll slow down and re-read the docs.

Best wishes

5 Likes

Your reaction really warms my heart in many ways. On the on hand we always went to help everyone who’s getting started as good as we can and on the other hand it’s sometimes just not possible to go further because of missing time and resources.

It’s especially great that you commented in a way that I totally didn’t expect. I thought it’s going to be at least disappointment or even anger. It tells a lot about you that your comment is so self-reflected.

You are also right with your remarks about the documentation. Of course we have assumptions of the knowledge of our users. We already try to keep the entry barrier as low as possible. We hate it when the docs start something like “Just run npm run dev” without any additional explanation. But we have the same kind of weak spots. It’s becoming tougher and tougher to put ourselves into the shoes of beginners and balance the expectations of novices and pro users in the docs at the same time.

If you find something you stumble upon, you are very welcome to leave us an issue on Github: https://github.com/getkirby/getkirby.com/issues

Hi. Wow, thank you for your reply.

As a designer I am often trying to bridge the gap between my clients expertise and what their audience knows. As you say dealing with ‘assumed knowledge’. Once we’re experts in something it then becomes very hard to explain it to someone who knows little. And I know little when it comes to CMS, PHP and development!

An example of this is I don’t know what Github is or how to leave an issue (without breaking anything)! If I have any suggestions perhaps I can simply direct message you on here?

Best wishes

Mark

I don’t think this will work well. We use GitHub issues (Kirby · GitHub) to keep track of issues (e.g. for the docs that would be here: Issues · getkirby/getkirby.com · GitHub) and https://feedback.getkirby.com for feature suggestions).

You can also post documentation suggestion in the respective channel on Discord; https://chat.getkirby.com/

Both GitHub and Discord need an account.

1 Like

I know I am late to this conversation, but also you don’t have to worry about breaking anything. Posting an issue on Github is like leaving a comment, you cannot break anything for us. Worst what could happen is an issue in a wrong repository or so - but we can move that around, so that’d be not bad at all :slight_smile: