- Anybody knows which elements you used to generate your filter-enine.
There are a lot of ways of how to generate a FILTER.
- Using Wix-Data.
- Using Datasets
- Coding way / property-panel-way.
- Also it depends on structure of your DATABASE(s).
Now I want my filter elements to move to a popup.
Normaly an experienced CODER, would avoid to generate a filter-engine directly on the page (frond-end), to avoid the above problematic situation.
Better would be to generate a BASIC-FILTERING-ENGINE on BACKEND or at least in a public JS-file.
Why???
If you would do it like described, you wouldn’t have the problem now, which you have at the moment, because you would be able to use your FILTERInG-FUncTION from everywhere.
a) from each of your FRONT-END-PAGES
b) from a LIGHTBOX
c) from MASTER-PAGE
…because you would be able to start your public function(s) from everytwhere.
In your case, you programmed it surely at Front-End, and directly bided all your related ELEMENTS on the page to your code. Since you have done it → now your code is BINDED to your page.
When you code next time some specific functions, try to code it more generaly, flexible, as a RETURNING-FUNCTION…
…you put it some data ----> you get some edit/modified data back on frontpage.
Now you are able to use this data-package and bind it to your elements.
Confirmation of my suggestion…
I have seen some forum posts from people who wanted to do it similarly. Unfortunately the solutions were always something like: create variables for each function, export, import ect. In short: a lot of workarounds
Yes, you already have found some right onfo.
Export / import —> DATA-PACKAGES ( ARRAYS+OBJECTS )
In your case, you will have to code it on your Lightbox again, or you do it like…
Doing the FILTERING on your page and sending only the results to your LIGHTBOX, showing them on the LIGHBOX.
Normaly you could copy&paste all your code, which you already have on your page to your LIGHBOX.
So in future try to code GENERAL-RETURN-FUNCTIONS, either on BACKEND or in PUBLIC-JS-FILE, to avoid …
I have the problem that my filter function code is very complex and it will be too much trouble for me to do it this way and still keep the overview.