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

Feature Suggestion: Access to on-canvas field values via twig. #477

Open
Jsewill opened this issue Apr 26, 2023 · 0 comments
Open

Feature Suggestion: Access to on-canvas field values via twig. #477

Jsewill opened this issue Apr 26, 2023 · 0 comments

Comments

@Jsewill
Copy link
Contributor

Jsewill commented Apr 26, 2023

It would be very nice to have access to the value of a named element via twig. An example use case:

<figure>
    <img src="..." alt="{{ img_caption }}" ... />
    <figcaption data-fred-name="img_caption">Caption text goes here.</figcaption>
</figure>

Where the above is the source of an element; the caption should be editable on-canvas, rather than in an option. Currently, these sorts of values are inaccessible. It would be wonderful to have access to them, as you can see in this example. Otherwise, we must resort to using options, which defeats the purpose of Fred. (Not that options are bad, they're great). There are plenty more use cases where it would be beneficial to have access to on-canvas values via twig.

A simple improvement like this would go a long way toward bringing Fred closer to traditional modx style templating--an attribute for which web shops have long preferred modx. modx has been such a great tool over the years, especially as it relates to templating and such. I want to see modx catch up to, and surpass, other CMS/CMF projects in features like this (and in every way). Bringing the front-end editor on par with traditional modx templating would be awesome!

@Jsewill Jsewill changed the title Feature Suggestion: Access to field values via twig. Feature Suggestion: Access to on-canvas field values via twig. Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant