Closed
Description
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 %}
because TemplateSyntaxError: Variables and attributes may not begin with underscores: '__pattern_library_view'
Describe the solution you'd like
Change __pattern_library_view
to is_pattern_library
in the context
Describe alternatives you've considered
My workaround was to add a dummy variable in the yaml and use that