From 16dace9d6a4383cb6ec827e349fcb9de728d47ee Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Sat, 1 Apr 2023 19:20:12 +0200 Subject: [PATCH] docs: adapted documentation --- packages/docs/src/docs/pattern-parameters.md | 95 +------------------- 1 file changed, 1 insertion(+), 94 deletions(-) diff --git a/packages/docs/src/docs/pattern-parameters.md b/packages/docs/src/docs/pattern-parameters.md index 5b040e926..c41130647 100644 --- a/packages/docs/src/docs/pattern-parameters.md +++ b/packages/docs/src/docs/pattern-parameters.md @@ -11,97 +11,4 @@ sitemapPriority: '0.8' sitemapChangefreq: 'monthly' --- -**Important:** Pattern parameters are supported by the Node Mustache PatternEngines. Other template languages provide better solutions to this problem. - -Pattern parameters are a **simple** mechanism for replacing Mustache variables in an included pattern. They are limited to replacing variables in the included pattern and **only** the included pattern. They are especially useful when including a single pattern multiple times in a molecule, template, or page and you want to supply unique data to that pattern each time it's included. Pattern parameters **do not** currently support the following: - -- sub-lists (_e.g. iteration of a section_), -- long strings of text (_can be unwieldy_) -- modifying/replacing variables in patterns included _within_ the targeted pattern - -Pattern parameters are Pattern Lab-specific, have no relationship to Mustache, and are implemented outside of Mustache. Learn more about pattern parameters: - -- [The Pattern Parameter Syntax](#pattern-parameter-syntax) -- [Adding Pattern Parameters to Your Pattern Partial](#adding-pattern-parameters) -- [Toggling Sections with Pattern Parameters](#toggling-sections) - -## The Pattern Parameter Syntax - -The attributes listed in the pattern parameters need to match Mustache variable names in your pattern. The values listed for each attribute will replace the Mustache variables. For example: - - {% raw %}{{> patternGroup-pattern(attribute1: value, attribute2: "value string") }}{% endraw %} - -Again, pattern parameters are a simple find and replace of Mustache variables with the supplied values. - -## Adding Pattern Parameters to Your Pattern Partial - -Let's look at a simple example for how we might use pattern parameters. First we'll set-up a pattern that might be included multiple times. We'll make it a simple "message" pattern with a single Mustache variable of `message`. - -```html -
-``` - -We'll organize it under Atoms > Global and call it "message" so it'll have the pattern partial of `atoms-message`. - -Now let's create a pattern that includes our message pattern partial multiple times. It might look like this. - -```html -