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

Allow Custom Variables in the Editor #35806

Open
deborah86 opened this issue Oct 20, 2021 · 3 comments
Open

Allow Custom Variables in the Editor #35806

deborah86 opened this issue Oct 20, 2021 · 3 comments
Labels
[Feature] Block bindings [Feature] Custom Fields Anything related to the custom fields project - connecting block attributes and dynamic values [Type] Enhancement A suggestion for improvement.

Comments

@deborah86
Copy link

What problem does this address?

There is no real way to add custom variables to pages from a database. The closest option in WordPress was to use custom fields but it seems as though that is being phased out. Other CMS's such as Webflow, SquareSpace, and Wix allows users to add custom information from a database to their pages.

What is your proposed solution?

Give uses an easy panel to store variables in a variables database. Then allow users to access those variables in the page design. For example, if I wanted to show the logged-in user's name on a page I would type or select the option from the list:

Welcome, {{first.name}}!

There are users with the names Bob, Mary, and Robert. Based on who is logged in the user would see:

Welcome, Bob!
Welcome, Mary!
Welcome, Robert!

Users would be able to create their own variables and edit them with javascript.

@bph bph added the New Block Suggestion for a new block label Oct 20, 2021
@carlomanf
Copy link

#29173 is related.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 18, 2023
@t-hamano
Copy link
Contributor

Wouldn't this problem be solved by attaching custom fields to blocks via the Block Bindings API?

@t-hamano
Copy link
Contributor

Regarding embedding dynamic data as inline, this might be achievable with the inline bit. Please see the suggested UX here: #39831 (comment)

@t-hamano t-hamano added [Feature] Custom Fields Anything related to the custom fields project - connecting block attributes and dynamic values [Feature] Block bindings and removed New Block Suggestion for a new block labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block bindings [Feature] Custom Fields Anything related to the custom fields project - connecting block attributes and dynamic values [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants