7 years ago
Topic

Hi there,

I don´t know if It is possible because I didn´t find nothing similar in my forum searches.

I have a list and search type using blog template. It works fine, but I need to get all items ID and store it in a session array. 

Does exist a way to access the search result object?

Thanks in advance

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
4
Level 1

Hi,

you could use befoeRender event from Code pack, $items are available there as a variable, you would jsut need to loop trough them to get ids and store them in session storage.

7 years ago
3
Level 2

Hello Klas,

Thanks for your answer.

I couldn´t find the variable $items in beforerender event (Used var_dump to test it) neither in form search nor in item view.

What could I be doing wrong?

Thanks in advance

1283 Posts
Bucklash
7 years ago
0
Level 3

DELETE

rubbish reply from me

4229 Posts
Kadministrator
7 years ago
1
Level 3

$items is ofcourse only available in list, in form there are no results yet and since no $items variable.

7 years ago
0
Level 4

I really couldn´t find $items variable on beforeform field. Only solution I found was make a copy of list template,  and in this new template alterate index.php file to access $items variable using a loop as suggested.

Thanks

7 years ago
0
Level 1

Hi there,

Any other Idea to achieve the goal?

Thanks 

Get a Book for SEBLOD