Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Support drafts #61

Open
bnomei opened this issue Feb 21, 2021 · 3 comments
Open

Support drafts #61

bnomei opened this issue Feb 21, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@bnomei
Copy link
Owner

bnomei commented Feb 21, 2021

No description provided.

@bnomei bnomei added the enhancement New feature or request label Feb 21, 2021
@bnomei bnomei self-assigned this Feb 21, 2021
bnomei added a commit that referenced this issue Feb 21, 2021
related #61

Signed-off-by: Bruno Meilick <b@bnomei.com>
bnomei added a commit that referenced this issue Feb 22, 2021
Signed-off-by: Bruno Meilick <b@bnomei.com>
bnomei added a commit that referenced this issue Feb 22, 2021
Signed-off-by: Bruno Meilick <b@bnomei.com>
bnomei added a commit that referenced this issue Feb 22, 2021
Signed-off-by: Bruno Meilick <b@bnomei.com>
bnomei added a commit that referenced this issue Feb 24, 2021
Signed-off-by: Bruno Meilick <b@bnomei.com>
@pichiste
Copy link

pichiste commented Mar 9, 2022

Hi, wondering if there are still plans to support drafts. I'm using this plugin to create relationships between draft pages before publishing everything, but the lack of drafts support is causing display issues in the panel UI.

Thanks

@bnomei
Copy link
Owner Author

bnomei commented Mar 10, 2022

as far as i can tell from my last commits in feb 21 i switched to kirbys core lookup for drafts. i am not sure why i did not close this issue back then. seems done. 🤷‍♂️

what exactly does not work for you in the panel?

@pichiste
Copy link

Hi @bnomei, thanks for your response. Basically, in a section blueprint I want to display the title of a related page like this:

info: "{{ page.people.toStructure().first.foreignkey.fromAutoID().title }}"

...where foreignkey is a valid autoid.

This works fine when the page of that autoid is published, but not when it is a draft.

The reason seems to be that the autoid() helper (used by fromAutoID), doesn't work with drafts, at least according to the docs:
"autoid()-helper will not find drafts, so make it unlisted/listed"
https://github.com/bnomei/kirby3-autoid/wiki/PHP:-autoid(),-Field-Method-fromAutoID()#create-a-pagefile-programmatically-and-retrieve-autoid

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants