Skip to content

Commit

Permalink
pattern-lab#110 Added instructions on how to re-order pseudo-patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
heitoralthmann committed Dec 6, 2018
1 parent b9bb64b commit bd897e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/pattern-pseudo-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ Now when we generate our site we'll have our homepage template rendered twice. O
By default, pseudo-patterns **cannot** be used as pattern includes. The data included in the pseudo-pattern, the bit that actually controls the magic, cannot be accessed when rendering the pattern include.

To utilize pseudo-patterns as pattern includes for the PHP version of Pattern Lab you can install the [Data Inheritance Plugin](https://github.com/pattern-lab/plugin-php-data-inheritance).

## Re-ordering Pseudo-Patterns

To learn how to re-order pseudo-patterns, check [Reorganizing Patterns](pattern-reorganizing.md).
12 changes: 12 additions & 0 deletions docs/pattern-reorganizing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ You may want to put some space between the numbers just in case you want to furt
```

The numbers will not show up when Pattern Lab displays the name of the pattern in the drop-down navigation. They're simply a re-ordering mechanism.

##Re-ordering Pseudo-Patterns

When re-ordering pseudo-patterns the rules are slightly different. The numbers go **after** the tilde sign (`~`) rather than at the beggining of the file name:

```
- pattern.mustache
- pattern.yml
- pattern~01-variation2.yml
- pattern~02-variation3.yml
- pattern~03-variation1.yml
```

0 comments on commit bd897e8

Please sign in to comment.