if I understand correctly, there is no easy way to implement the following example:
I have several oh-image widgets on one page. When clicking on one of these widgets, I want to navigate to another page, which also contains an oh-image widget. This image widget should show the same image as the one clicked on.
A possible solution would be to create a page for each image. What I see as rather unsatisfactory.
Another possibility would be to pass the URL by variable, but I don’t see a way how I can set a variable on a click on an oh-image widget as well as navigate to another page.
To be a bit more clear: I would like to open a let’s say full screen image of a camera stream after clicking on the small thumbnail image. A popover is not the right thing for that. I’m using the UI on some wall mounted tablets. Also a popup is still not big enough. So navigating to a special camera page with a big image of the camera stream and a few buttons would be perfect. But I don’t like to create different pages for any of my cameras.
And yes I’ve read about action variables, I think they only work if the action is set to variable, but then it is no longer possible to open a popover, popup or navigate to a different page.
I don’t know that widgets are limited to only one Action. But if variables won’t work, popups won’t work, the actionPhoto/actionPhotoBrowser won’t work and we already know that properties won’t work than yes, you’ll have to create a page for each camera to implement this exactly how you want to.
Yes, there is a built-in way to this. The action you are looking for is the navigate action. This will use the app’s native f7 routing to move to the indicated page. But in addition to just moving to a page you can set a series of variables that will be passed to the new page’s vars object for use in the new page.
For example I have page with a widget that uses a variable for its configuration:
At the moment I believe they are. It is possible to get around that sometimes by taking direct advantage of the f7 popupOpen properties to open a popup without using the OH action and the use the OH action to set some variables, but there’s no way to trigger two OH actions with the same widget simultaneously, that I’m aware of.