Share » Forums » Developer » Testing existence of a post/get...

Testing existence of a post/get variable in templates

Testing existence of a post/get variable in templates

Wednesday 18 May 2005 2:08:37 am - 3 replies

Modified on Wednesday 18 May 2005 2:09:13 am by Roberto Frascarelli

Author Message

Ɓukasz Serwatka

Monday 30 May 2005 1:15:10 am

Hi Roberto,

is_set() can check variable, ezhttp() is a function so this is a reason why is_set() returns template error.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Hans Melis

Monday 30 May 2005 1:23:24 am

Roberto,

You can't avoid that template error when using ezhttp. The code for the operator does a $http->has(Post|Get|Session)Variable() and prints the error in the else branch.

Doing an is_set on the result of ezhttp can't aleviate the problem because the error comes from the ezhttp operator itself.

It annoys me too, but it really isn't a problem with your code, nor in eZ publish's code.

Hans
http://blog.hansmelis.be

Roberto Frascarelli

Monday 30 May 2005 1:48:58 am

Ok I understand the nature of the error message,
and the bad use of the ezhttp() function in my template code, but there is only one alternative way to test the existence of a variable in post into templates...the definition of a custom template
function...right?

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu