Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also keep route grid working when no static content is linked #55

Merged
merged 2 commits into from
May 11, 2017
Merged

Also keep route grid working when no static content is linked #55

merged 2 commits into from
May 11, 2017

Conversation

stefandoorn
Copy link
Contributor

Mainly it was an issue on my fixtures side, as I forgot to link a StaticContent object to the Route object I was importing. But, as soon as a StaticContent seems gone and the Route cannot find the relation anymore, the grid errors that the data.title is not available (data is null). It doesn't harm to add this if statement I think, as it helps to keep the grid running even though there is some content missing somewhere.

@@ -1 +1,3 @@
{{ data.title }}
{% if data is not same as(null) %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(% if data is not null %} - doesn't work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, might be. This is what I'm also using :) But it seems to work: https://twig.sensiolabs.org/doc/2.x/tests/null.html :)

@stefandoorn
Copy link
Contributor Author

Adjusted it, your suggestion should work :)

@michalmarcinkowski michalmarcinkowski merged commit c9dc6f4 into Lakion:master May 11, 2017
@michalmarcinkowski
Copy link
Member

Thanks Stefan! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants