Sha256: b1cb1fe58a966c9979544e6bcec8634c82741805afafa6dec57822a96a64bbc9

Contents?: true

Size: 1.04 KB

Versions: 33

Compression:

Stored size: 1.04 KB

Contents

# Do not depend on the content of `content_for_header` (`ContentForHeaderModification`)

Do not rely on the content of `content_for_header` as it might change in the future, which could cause your Liquid code behavior to change.

## Check Details

:-1: Examples of **incorrect** code for this check:

```liquid
{% assign parts = content_for_header | split: ',' %}
```

:+1: Examples of **correct** code for this check:

The only acceptable usage of `content_for_header` is:

```liquid
{{ content_for_header }}
```

## Check Options

The default configuration for this check is the following:

```yaml
ContentForHeaderModification:
  enabled: true
```

## Version

This check has been introduced in Theme Check 0.9.0.

## Resources

- [Rule Source][codesource]
- [Documentation Source][docsource]
- [`theme.liquid` template considerations][considerations]

[codesource]: /lib/theme_check/checks/check_class_name.rb
[docsource]: /docs/checks/check_class_name.md
[considerations]: https://shopify.dev/docs/themes/theme-templates/theme-liquid#template-considerations

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
theme-check-1.15.0 docs/checks/content_for_header_modification.md
theme-check-1.14.0 docs/checks/content_for_header_modification.md
theme-check-1.13.0 docs/checks/content_for_header_modification.md
theme-check-1.12.1 docs/checks/content_for_header_modification.md
theme-check-1.12.0 docs/checks/content_for_header_modification.md
theme-check-1.11.0 docs/checks/content_for_header_modification.md
theme-check-1.10.3 docs/checks/content_for_header_modification.md
theme-check-1.10.2 docs/checks/content_for_header_modification.md
theme-check-1.10.1 docs/checks/content_for_header_modification.md
theme-check-1.10.0 docs/checks/content_for_header_modification.md
theme-check-1.9.2 docs/checks/content_for_header_modification.md
theme-check-1.9.1 docs/checks/content_for_header_modification.md
theme-check-1.9.0 docs/checks/content_for_header_modification.md
theme-check-1.8.0 docs/checks/content_for_header_modification.md
theme-check-1.7.2 docs/checks/content_for_header_modification.md
theme-check-1.7.1 docs/checks/content_for_header_modification.md
theme-check-1.7.0 docs/checks/content_for_header_modification.md
theme-check-1.6.2 docs/checks/content_for_header_modification.md
theme-check-1.6.1 docs/checks/content_for_header_modification.md
theme-check-1.6.0 docs/checks/content_for_header_modification.md