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

Pseudo patterns not working with twig php engine #1045

Closed
zhawkins opened this issue Aug 26, 2019 · 2 comments
Closed

Pseudo patterns not working with twig php engine #1045

zhawkins opened this issue Aug 26, 2019 · 2 comments
Labels
bug 🐛 twig renderer Issues and updates related to the PHP-based Twig rendering engine

Comments

@zhawkins
Copy link
Contributor

I am using Pattern Lab Node v3.0.2 on Mac, with Node v11.2.0, using edition-twig (php engine).

Expected Behavior

Within pages, the pseudo pattern 00-homepage~emergency.json should build out a new page that displays the 00-homepage.twig pattern rendered with the data provided by 00-homepage~emergency.json.

Actual Behavior

Trying to load the homepage emergency page in Pattern Lab displays raw json data

{ "emergency": { "styleModifier" : "error", "excerpt" : { "short" : "Emergency! This is a variation of the core homepage template." } } } 
Steps to Reproduce
  • npm create pattern-lab
  • Select edition-twig (php engine)
  • Select starterkit-twig-demo
  • npm run serve
  • Browse to the Homepage Emergency page (http://127.0.0.1:3000/?p=pages-homepage-emergency)
  • Note that raw json data is displayed on the page instead of rendered html.
zhawkins pushed a commit to zhawkins/patternlab-node that referenced this issue Aug 26, 2019
Fixes issue where Twig PHP isn't rendering pseudo patterns correctly.

Closes issue pattern-lab#1045
@zhawkins
Copy link
Contributor Author

Created a PR to fix this issue: #1046

@sghoweri sghoweri added bug 🐛 twig renderer Issues and updates related to the PHP-based Twig rendering engine labels Sep 17, 2019
@zhawkins
Copy link
Contributor Author

Closing this as the PR has been merged. 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 twig renderer Issues and updates related to the PHP-based Twig rendering engine
Projects
None yet
Development

No branches or pull requests

2 participants