Navigating back to "My favorites" page from detail page

Hola Adalo friends!

Thank you for all your help so far :smiley:

Here’s what’s happening:
• The user discovers a list of products in the homepage. Adds a product to “Favorites”.
• When the user clicks in any of the products from the Homepage, s/he goes to the product detail page. In this page, there’s a back button that links to the Homepage (it can’t link to “Back” because there’s another page after the detail page, so the back button can link to this one sometimes).
• The user goes to “My Favorites” page. S/he taps on the favorited product, which links to the detail page – but the back button in this page goes to the Homepage, which is not a good UX. Ideally the back button should go to the “My favorites” page.

Has anyone found a workaround for this?
Thank you in advance!

Add 2 link actions. One goes to the home and one to the favorites. Set a condition on the actions.

First, I’m assuming you have a product ID (Number parameter or text parameter with UUID). If you don’t have a product ID for your products, add one.

On the link to the home screen, sometimes if logged in user product favorites count is equal to 0 where product ID is equal to the current product.

On the link to the favorites screen, sometimes if logged in user product favorites count is greater than 0 where product ID is equal to the current product.

1 Like

Thank you @Flawless!

Let me see if I got this right: so the conditional page link depends on the user having favorited an item (?)
What happens in this case: The user has several favorite items already (let’s say from a previous session). S/he goes to the homescreen, taps on a product that has the favorite status checked, goes to the detail page, taps on back, and then supposedly goes to the Favorites page, correct?

Is there anyway to make a page link “back” only when the user came from a first level page?

Because I can’t find that option, I’m tempted to do a “tabs”-like filter in the Homepage – sort of plan B :thinking:

You can add a true/false parameter to the user collection and call it “Browsing Favorites”.

On your list of regular products, right before the link action, add an update user action to set the “Browsing Favorites” to false.

On your list of favorite products, right before the link action, add an update user action to set the “Browsing Favorites” to true.

On the detail page, for those link actions, just use the true/false parameter instead. This way, you’ll know that they clicked a favorite product first before entering the detail page.

If true, send to favorites page, if false, send to home.

1 Like

Excellent – it worked!
Thank you SO MUCH @Flawless

1 Like