Work with POST/GET

Author Message

Thomas Brandl

Wednesday 10 September 2003 5:15:19 am

Hi all (I'm flooding the forums today...),

need a piece of info for a very simple task:
I want the user to choose/filter objects based on a select-box.
So I need to access POST/GET variables in order to use them in a let-fetch-statement, like pseudo code:
{let obj=fetch(content,list,hash(node_id,$POST.formfield_name,...))}

How can I do this in the most simple manner? Do I need a module for that? Does anyone have a *really* simple example of such a module, using some common API-functions to demonstrate, how to work with modules?

Thanks a lot!
Tom

Paul Forsyth

Wednesday 10 September 2003 6:10:04 am

Look at the contribution for ezenv. I dont have the url at hand but it should be easy to find. This will allow you to use post/get variables in templates.

Paul

Thomas Brandl

Wednesday 10 September 2003 8:30:07 am

Thanks Paul, that will do, I guess!

For those interested:
http://ez.no/developer/ez_publish_3/contributions/ezenv

Paul Borgermans

Wednesday 10 September 2003 8:36:53 am

This is only a temporary work-around I wrote out of frustration, you need to turn of view caching!

Its on ez's todo list for a more general mechanism: the main problem is that such variables should be included in the standard view caching

You can implement the caching yourself with cache-blocks which include the post/get variable value in the cache block key.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Thomas Brandl

Monday 15 September 2003 9:21:31 am

So what you did is turn off view-caching and apply cache-blocks everywhere, where they were neccessary??

Don't you loose lots of performance that way?
t

Paul Borgermans

Monday 15 September 2003 9:28:15 am

Yes, it puts a heavy burden on CPU and end-user patience.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Thomas Brandl

Tuesday 16 September 2003 4:29:32 am

Damn, I was hoping to come around this easily! My machine is a PII 233MHz - can't afford to turn off caching!

Any ideas on how to accomplish that - well then not the easy way?

@eZ: I definitely think that such basic communication between forms and the system should be possible without much hassle. Are there any plans to support sht. like this in the near future? Or any reasons, why you do not want to implement it?

(I feel really bad when pushing eZ, since they already have a load of work to do, and I actually should just sit still and be thankful ...)

Btw: Thanks for the attribute_filter info, Paul, should have found this myself ;)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.