Results 1 to 4 of 4

Thread: [solve] result of a filtering

  1. #1
    New user
    Join Date
    02-24-12.
    Posts
    19

    Default [solve] result of a filtering

    Hi,

    I need to generate documents (pdf and excel) according to the entries listed in my module's backend, and this need to be filtered.

    At the moment the only way I have found to do it is :
    - create a label callback
    - in my getLabel method : add the id of the current entry into an array on a session variable
    - read this variable, generate the document and delete the it.

    The problem is that the variable can only be 'destroy' when one of the documents is generated, so if someone use the filter twice without generating anything, it will be the wrong data in the array and my document will be diffrent from what is on the screen.

    This is really hard to explain and I hope you understand.

    What I like to do instead of this is either :

    - find a way to 'read' what is the current filter, then I ll make the appropriate sql request in my documents generator files

    - find a way to know what are the ids of the displayed items

    - find a completly different way to do it...

    Any ideas, suggestions ? Don t hesitate to ask for details if this is not clear enough,

    thanks

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: result of a filtering

    The current filter is stored in the SESSION for the table, e.g. tl_news. You should be able to pick it up from there. This method of setting the session to create a filter is used in the "node" method to filter the page tree based on the root point you click.

  3. #3
    New user
    Join Date
    02-24-12.
    Posts
    19

    Default Re: result of a filtering

    Thanks ! This should solve the problem, I'll let you know

  4. #4
    New user
    Join Date
    02-24-12.
    Posts
    19

    Default Re: result of a filtering

    yep, everything is already in the $_SESSION variable, in my case : $_SESSION['BE_DATA']['filter']['tl_sv_sales']['supplier']

    thank you again, it will be a lot more simple to do it now

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •