1

I have an include that is being used for plain entries, and is also being used for categories. (Categories have their own urls)

{% if entry is defined %}
    {% set entry = entry %}
{% elseif category is defined %}
    {% set entry = category %}
{% elseif event is defined %}
    {% set entry = event %}
{% endif %}

...

<h1>{{ entry.title }}</h1>

I am using the Solspace Calendar and would like to use the same hero template. However, I'm getting the "entry is not defined". I am not sure what the calendar entry type is. Is there a way to output what Craft is expecting?

I have also tried:

{% if entry is defined %}
    {% set entry = entry %}
{% elseif category is defined %}
    {% set entry = category %}
{% elseif calendar is defined %}
    ...
{% endif %}  

Thank you for any suggestions!

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.