Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Panel fields] Query templates for placeholder #1823

Closed
neildaniels opened this issue Jan 30, 2019 · 5 comments

Comments

@neildaniels
Copy link
Contributor

commented Jan 30, 2019

Describe the bug
The Blueprint Query Language does not seem to be supported in placeholder fields (at least for Text fields).

In my situation, a parent page has a "default" value stored in a field, and children have a field that can optionally override that field. It would be very helpful to have the "default" value displayed as a placeholder on the children pages.

      headline:
        label: Headline
        type: text
        placeholder: "{{ page.parent.defaultHeadline }}"

To Reproduce
Steps to reproduce the behavior:

  1. Have a parent page with a field
  2. Have a child page with a Text field has a placeholder that should display the parent field
  3. View the child page in the panel

Expected behavior
The stored value of the parent should be in the placeholder text. Instead the string {{ page.parent.defaultHeadline }} literally appears as the placeholder.

Kirby Version
3.0.1-rc.1

@bastianallgeier bastianallgeier transferred this issue from getkirby/kirby Jan 30, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

I moved this to the ideas repo as it's more a feature idea than a bug.

@distantnative distantnative changed the title Panel Fields Should Support Query Templates in Placeholder Field [Panel fields] Query templates for placeholder Feb 2, 2019
@mrflix

This comment has been minimized.

Copy link

commented May 6, 2019

I have a similar use case: the editor should be able to overwrite the menu title. E.g. per default the page title is used in the menu but it can be overwritten. Tried to use the query language in the help text

help: >
  Optional — overwrites {{ page.title }}

Which doesn't work. Looks like query language is not supported in help texts.

But this brought me here and actually using the placeholder to literally overwrite a default value is quite brilliant.

Before:
CleanShot 2019-05-06 at 23 44 06

After:
CleanShot 2019-05-06 at 23 44 23
CleanShot 2019-05-06 at 23 44 36

@distantnative distantnative self-assigned this Jun 2, 2019
@distantnative distantnative transferred this issue from getkirby/ideas Jun 2, 2019
@distantnative distantnative added this to the 3.2.0 milestone Jun 2, 2019
distantnative added a commit that referenced this issue Jun 2, 2019
@distantnative distantnative referenced this issue Jun 2, 2019
1 of 3 tasks complete
@distantnative distantnative modified the milestones: 3.2.0, 3.3.0 Jun 2, 2019
@distantnative

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

@distantnative: Could we add queries for the default value please as well? That would be really powerful.

@distantnative As @texnixe said that would be very powerful for multilang installs. I hope it can be achieved without too much work.

@moritzebeling

This comment has been minimized.

Copy link

commented Aug 17, 2019

Maybe the query language support could be added to several field properties like before, after, label, default, help, placeholder.

@distantnative distantnative removed their assignment Aug 17, 2019
distantnative added a commit that referenced this issue Aug 23, 2019
@distantnative distantnative self-assigned this Aug 23, 2019
@distantnative distantnative modified the milestones: 3.3.0, 3.2.5 Aug 23, 2019
@distantnative distantnative modified the milestones: 3.2.5, 3.3.0 Sep 13, 2019
@bastianallgeier

This comment has been minimized.

Copy link
Contributor

commented Sep 13, 2019

@bastianallgeier bastianallgeier modified the milestones: 3.3.0, 3.2.5 Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.