Skip to content

Commit 5a56ef0

Browse files
committed
Merge branch 'dev'
2 parents daf8271 + 90729e7 commit 5a56ef0

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Twig Templates for the Default StyleguideKit
2+
3+
These Twig templates are meant to be used with the [static assets](https://github.com/pattern-lab/styleguidekit-assets-default) for the default StyleguideKit. The Twig templates are for the "view all" view in Pattern Lab PHP.
4+
5+
## Installation
6+
7+
Pattern Lab PHP uses [Composer](https://getcomposer.org/) to manage project dependencies. To install the Mustache templates run:
8+
9+
composer require pattern-lab/styleguidekit-twig-default
10+
11+
## Development Requirements
12+
13+
In order to modify these templates you need to install the following:
14+
15+
* the [Twig Development Edition of Pattern Lab PHP](https://github.com/pattern-lab/edition-php-twig-development)
16+
17+
## Development Set-up
18+
19+
Once you've installed the requirements do the following to set-up for development:
20+
21+
1. `cd /path/to/dev-edition/packages/pattern-lab/styleguidekit-twig-default`
22+
2. `git config branch.dev.remote origin`
23+
24+
## Making Changes
25+
26+
Simply edit the files in `views/`.

views/partials/patternSection.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div>
1515
{% endif %}
1616
<div class="sg-pattern-example">
17-
{{ patternPartialCode | raw }}
17+
{{ partial.patternPartialCode | raw }}
1818
</div>
1919
{% for patternExampleAddition in partial.patternExampleAdditions %}
2020
{{ patternExampleAddition | raw }}

views/viewall.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Patterns -->
66
<div id="sg-patterns">
77
{% for partial in partials %}
8-
{% if partial.patternSectionSubtype }}
8+
{% if partial.patternSectionSubtype %}
99
{% include "patternSectionSubtype.twig" %}
1010
{% else %}
1111
{% include "patternSection.twig" %}

0 commit comments

Comments
 (0)