Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [null]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
83 views

Macro for entry loop causing 'null' variable template error

I am new to the concept of Twig templates and I can’t get it right from the documentation … What I am trying to achieve is to have a reusable Blogroll snippet that outputs entries in different ...
1
vote
1answer
129 views

How to check for a value OR NULL on custom enddate field using yii syntax when calling entries?

I have a section of 'deals/coupons' with custom startDate and endDate. These are needed so the client can load up a bunch of deals but only have them render to the page when a particular deal is '...
1
vote
1answer
162 views

craft.request.getParam('entryId') returns null on edit page of an entry

I have a plugin that's loaded on the edit page of an entry. Whenever I open the entry edit page, I would like to retrieve the id of this particular entry. I've tried this: {% set someId = craft....
1
vote
1answer
427 views

Template variables from active record on NULL value

I have a template variable thus public function twitterAccounts() { return craft()->myPlugin->getAllAccounts(); //Craft::dd(craft()->myPlugin->getAllAccounts()); } it calls the ...
1
vote
1answer
2k views

Best way to deal with Impossible to access an attribute (“isEditable”) on a NULL variable (“”)

I've had this issue a few times & wanted to know if there is maybe a better way to deal with the following issue: Say I have this if on a page: {% if entry.isEditable %} <a href="{{ entry....
12
votes
2answers
8k views

What's the difference between “is defined” and “is not null”?

{% if var is defined %} and {% if var is not null %} Is there a difference in usage of them?