Change __pattern_library_view
to is_pattern_library
and make it an official "API"
#156
Labels
enhancement
New feature or request
Milestone
Is your proposal related to a problem?
There are cases when it comes handy to check whether a pattern is displayed in the pattern library or is an actual page.
We have
__pattern_library_view
in the context, however you cannot use it like{% if __pattern_library_view %}
becauseTemplateSyntaxError: Variables and attributes may not begin with underscores: '__pattern_library_view'
Describe the solution you'd like
Change
__pattern_library_view
tois_pattern_library
in the contextDescribe alternatives you've considered
My workaround was to add a dummy variable in the yaml and use that
The text was updated successfully, but these errors were encountered: