{% if sub %}
{% set image = sub.sidebar_url %}
{% elif IS_EVENT() %}
{% set image = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/sidebar") %}
{% else %}
{% set image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") %}
{% endif %}
{% if request.path != '/sidebar' %}
{% if v and (v.is_banned or v.chud) %}
{% elif not (sub and sub.name == 'chudrama' and v and not v.can_see_chudrama) %}
{% endif %}
{% endif %}