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

Support display_if for page templates #681

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ethitter
Copy link

Page templates are a special field in Core, and rather than requiring hidden fields to support conditioning a field on them, FM should handle them accordingly.

By specifying the page_template key instead of the src and value keys, this will toggle fields based on the chosen page template.

Fixes #414

Copy link
Member

@kevinfodness kevinfodness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍣


public function test_display_if_markup_for_page_template() {
$name = rand_str();
$template = 'toaster.php';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure there's a good story behind this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

I wish it was more than this being a word unlikely to come up in a non-testing context. Instead of foo and bar, I use waffle iron and toaster pastry, for reasons I can no longer recall; probably something about being self-taught and learning programming when I was a hungry teenager. 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "display_if" integration for page templates
3 participants