Unable to select image within textbox to place between paragraphs

Hi all,

Trying to select a file/image within a text-box in the panel to place between 2 paragraphs. The image tag is staying in text : (image: 1_a.jpg) on the site and isn’t compiling to the image. I’ve also tried adding a img tag in the textbox and manually selecting the source of the image as “https://getkirby.com/docs/reference/text/kirbytags/image” but also unable to display.

Would really appreciate some guidance.

Simon

Hi, welcome to the forum.

If Markdown and KirbyText don’t render, you most probably don’t use the kirbytext/kt()methods in your template, or do you?

<?= $page->text()->kirbytext() ?>

Hi & thanks for the prompt response!

Heres an example of my project template markdown. I am using prj-section-img:first-child img to stick the first image while the prj-section-text div scrolls on the side. I was hoping to add additional images within <p><?= $section->text() ?></p> selected from the textbox file option.

<?php foreach ($page->children() as $section): ?>
  <div class="prj-section">

    <?php foreach ($section->images() as $image): ?>
      <div class="prj-section-img">
        <?= $image ?>
      </div>
    <?php endforeach ?>


    <div class="prj-section-text">
      <h1><?= $section->heading() ?></h1>
      <p><?= $section->text() ?></p>
    </div>
  </div>
<?php endforeach ?>

If you include images in your text field with the image tag (image: someimge.jpg) then you have to render your text field with

<?= $section->text()->kirbytext() ?>

without wrapping it in <p> tags, instead of

  <p><?= $section->text() ?></p>

(Is there a reason why you use those <br> tags in your text field?)

On a side note: Correct me if I’m wrong, but your heading field seems a bit superflous, because if seems to only repeat what is already in the title?

Perfect ! Thanks alot.