bjlewis2 [Oct 12th at 7:24 PM] Anybody ever successfully documented a pattern variation in PL? I have:
menu-block.twig
menu-block.yml
menu-block.md <-- works
menu-block~footer.yml <-- works
menu-block~footer.md <-- doesn't work :(
6 replies Johnny5th [3 days ago] no, I think I tried that once. There was something else that the variations wouldn’t do, but I forgot what it was 😕
bjlewis2 [3 days ago] okay. That seems to be the consensus 😞
danny_englander [3 days ago]
@bjlewis2 Emulsify's "card" has a variation card~bg.yml
but the md file does not have the ~
and it works. (card-bg.md
) (edited)
Screen Shot 2018-10-12 at 10.47.10 AM.png
bjlewis2 [3 days ago] Sweet! I got it. Looks like you can’t have numbers in the file names. (I have numbers in the yml files to order then visually)
Here’s what works for me:
menu-block-footer-cta.md
menu-block-footer.md
menu-block.md
menu-block.twig
menu-block.yml
menu-block~01-footer.yml
menu-block~02-footer-cta.yml
However, the md file looks like it takes precedence over the yml file’s order, so they’re showing in the opposite order that I want them. (edited)
bjlewis2 [3 days ago] Huzzah! You can add the number to the beginning of the md file to order them!
So, this works, and shows them in the order I want:
01-menu-block.md
02-menu-block-footer.md
03-menu-block-footer-cta.md
menu-block.twig
menu-block.yml
menu-block~footer-cta.yml
menu-block~footer.yml
(I removed the numbers from the yml files since that doesn’t do anything anymore)
P.S. If you are just using the yml files, and add numbers to order them, the number has to come after the ~
otherwise it’ll say “I can’t find the component 01-whatever.twig