How to add Custom HTML/Link to a Pages Column from pageMethods

I would like to add a custom HTML Tag / Custom Link to a pages section title column.
Unfortunately i did not have success. Also type: url does not work for me…
In a pages section with list-layout that is working. (above)
Is that possible at all? What is the trick?

among others i tried the following yaml:

  pagesTable:
    type: pages
    headline: Pushes Overview Table
    layout: table
    text: false
    columns:
      title:
        label: Titel
        html: true
        value: "{< page.getMessagePagesText >}"
      autopublish:
        label: Autopublish
        value: "{{ page.autopublish.toDate('d.m.Y | H:i')}}Uhr"
      ...

Can’t see any difference:

    columns:
      test:
        label: HTML Test
        html: false
        value: "<a href="https://google.de">test</a>"
      test2:
        label: HTML Test 2
        html: true
        value: "<a href="https://google.de">test</a>"

Should be:

title:
 label: Text
 type: html
 value: "{{ page.getMessagePagesText }}"

Thx, that works and i saw you have updated the docs. :ok_hand:

Since 3.7 we have to use "{< page.getXyzHTML >}" to add HTML to text or info of a pages section.
Any Reason why that is different in that case ?

Is it possible to overwrite the default title-column to a HTML-Type instead of a URL-Type?
My current workaround is to set text: false and create a new title column:

  layout: table
    # text: "{< page.getPagesText >}"
    text: false
    columns:
      title:
        label: Title
        type: html
        value: "{{ page.getPagesLink }}"
        mobile: true

I don’t have the slightest idea. It probably needs some more work.

We talked about this exact question this morning. We plan to implement it that way in Kirby 3.8.

1 Like