Structure content of site info

Hello,

I’m totally new to Kirby and PHP so my question may be a dump one.
Let me try to explain what I want to get:

At the panel => Settings we have a field called “site info”

My goal is to “format” the information I store there, for example:

Info #1__________Info #2__________Infos #3
(instead of underscores I want to have blank space)

So if I type these 3 informations with 10 blanks between each, there will only be save one blank. I also tried to store these phrase in the site.txt with same result. :frowning:

Any help is highly appreciated.

Thanks,
Frank

I can’t reproduce this. If I add more than one space to a text field (in the middle, not at the ends!), all spaces get saved to the text file. What you mean is maybe that the spaces are not displayed in the browser. This is normal as more than one space gets collapsed to one, otherwise layouts would break. This has nothing to do with Kirby though.

But besides that space collapsing issue: I wouldn’t recommend using spaces to separate content columns. Lining it up (especially if you want to have multiple lines per column) is going to be really nasty.
Consider using Flexbox in CSS to create three separate columns (with three separate fields in Kirby). They will always be lined up perfectly.

1 Like

Thanks for your answer, @lukasbestle. Flexbox sounds like the right solution :slight_smile:

What I want to achieve can be seen at the bottom of the GetKirby page.
Left side there is some copyright info and right side are a couple of hyperlinks.

But then it’s only 2 columns, right?

My goal is to have three columns, maybe four.

Then Flexbox is the way to go. There are a lot of tutorials on the topic, for example What The Flexbox?! by Wes Bos. There’s nothing special with Flexbox in the Kirby context, you just need one field per column.

1 Like

OK, I’m already downloading all of Wes’ videos. Thanks for your help.
Now it’s time for me to learn.

flexbox is a good idea and well supported by modern browser. if you need columns more often you might cosider using a grid system based on flexbox like neat (build on sass).

1 Like